Main Content

removeConstraint

Remove constraint from variant configuration data object

    Description

    Note

    This function requires Variant Manager for Simulink®.

    removeConstraint(varconfigdata,constraintname) removes the constraint named constraintname from the Simulink.VariantConfigurationData object varconfigdata.

    example

    Examples

    collapse all

    Remove a constraint named LinNotExtern from the variant configuration data object varconfigdata.

    modelName = "slexVariantManagement";
    openExample(modelName);
    varconfigdata = Simulink.VariantManager.getConfigurationData(modelname);
    removeConstraint(varconfigdata,"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