Main Content

Create and Validate Variant Configurations

This example shows how to create and validate variant configurations for a model.

Step 1: Open Variant Manager

  1. Open the model in which you want to create variant configurations. For example, consider a model containing a Variant Source, Variant Sink, and a Variant Subsystem block.

  2. Right-click the variant badge and select Open in Variant Manager.

Step 2: Define Variant Configuration

You can use the Variant configuration data pane to define and store a variant configuration. For detailed information on each pane, see Variant Manager Overview.

  1. In the variant configuration data pane, click the Configurations tab.

  2. Click . A variant configuration is added. Type a name for this configuration in the Name column.

  3. Click the Control Variables tab in the controls section of the Configurations pane.

  4. To import the control variables for the variant configuration from the global workspace, click or to add new control variables to the model.

  5. Type a name for the variant configuration in the Name box available at the top-left of Variant Manager.

  6. To export the variant configuration information to the global workspace, click . The variant configuration for the model is now created.

Step 3: Activate and Validate Variant Configuration

To activate a variant configuration, select a configuration from the Configurations section and click the Activate button. The Activate button validates and applies the selected configuration on the model.


To reduce a model based on a variant condition, click Reduce model. For more information, see Reduce Models Containing Variant Blocks

Related Examples

More About