Main Content

removeConstraint

Class: Simulink.VariantConfigurationData
Package: Simulink

Remove a constraint from the variant configuration data object

Syntax

vcdataObj.removeConstraint(nameOfConstraint)

Description

vcdataObj.removeConstraint(nameOfConstraint), removes the constraint from the variant configuration data object.

Input Arguments

nameOfConstraint

Name of the constraint to be removed.

Examples

% Define the variant configuration data object
vcdataObj = Simulink.VariantConfigurationData;

% Add a constraint named LinNotExtern
vcdataObj.addConstraint('LinNotExtern','((Ctrl~=1)...
  || (PlantLocation ~=1))',...
  'Description of the constraint');

% Remove the constraint LinNotExtern 
% from the variant configuration
vcdataObj.removeConstraint('LinNotExtern')