主要内容

removeConstraint

Remove constraint from variant configuration data object

    Description

    Add-On Required: This feature requires the Variant Manager for Simulink add-on.

    removeConstraint(varConfigData,ConstraintName=constraintName) removes the constraint named constraintName from the Simulink.VariantConfigurationData object varConfigData.

    example

    Examples

    collapse all

    Open the slexVariantManagement model.

    modelName = "slexVariantManagement";
    open_system(modelName);

    Remove the constraint named LinNotExtern from the variant configuration data object varConfigData.

    varConfigData = Simulink.VariantManager.getConfigurationData(modelName);
    removeConstraint(varConfigData,ConstraintName="LinNotExtern");

    Input Arguments

    collapse all

    Variant configuration data from which you want to remove the constraint, specified as a Simulink.VariantConfigurationData 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 configuration data object varConfigData.

    Example: "PlantLocConstraint"

    Data Types: char | string

    Version History

    Introduced in R2013b

    expand all