Create a switch for toggling constraints

Create a switch that toggles variable value constraints.
  1. Create a label:
    1. In
      Project view
      , right-click
      MainWindow (type)
      and select
      New
      Base controls
      Label
      .
    2. Hover-over the label, select
      Edit
      Edit
      , and enter
      ToggleConstraintLabel
      .
    3. In
      Properties
      , set
      Text
      to
      Enable constraint
      .
  2. Create the switch:
    1. In
      Project view
      , right-click
      MainWindow (type)
      and select
      New
      Base controls
      Switch
      .
    2. Hover-over the switch, select
      Edit
      Edit
      , and enter
      ToggleConstraintSwitch
      .
    3. In
      Properties
      pane, create a dynamic link between
      Active
      and
      ProjectName
      Model
      ConstrainedVariable
      EURange
      Constrain
      .
      For more information about dynamic links, see Create dynamic links.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.