Contenido principal

removeConstraint

R2026b

Remove constraint from variant configurations object

    Description

    removeConstraint(varConfigs,ConstraintName=constraintName) removes the constraint named constraintName from the Simulink.VariantConfigurations object varConfigs.

    example

    Examples

    collapse all

    Open the slexVariantManagement model.

    modelName = "slexVariantManagement";
    open_system(modelName);

    Remove the constraint named LinNotExtern from the variant configurations object varConfigs.

    varConfigs = Simulink.VariantManager.getVariantConfigurations(modelName);
    removeConstraint(varConfigs,ConstraintName="LinNotExtern");

    Input Arguments

    collapse all

    Variant configurations object from which you want to remove the constraint, specified as a Simulink.VariantConfigurations object.

    Name of the constraint that must be removed, specified as a character vector or string scalar. This constraint must be present in the variant configurations object varConfigs.

    Example: "PlantLocConstraint"

    Data Types: char | string

    Version History

    Introduced in R2013b

    expand all