Simulink.VariantManager.activateModel
Class: Simulink.VariantManager
Package: Simulink
Syntax
Description
Note
This method requires Variant Manager for Simulink®.
The Simulink.VariantManager.activateModel
method allows you to validate
and activate a variant configuration on the given model and any referenced components in the
model hierarchy. You can activate a named variant configuration defined for the model or the
global workspace configuration (temporary configuration in the base workspace or data
dictionary used by the model).
The process validates if the variant elements in the model, such as variant blocks, variant controls, constraints, and the variant configuration, are set up correctly. When you activate a configuration using this method, it:
Checks if applicable constraints are satisfied
Pushes the variant control variable values to the base workspace or data dictionary used by the model, for use in simulation and code generation workflows
Reports an error if the activation fails
Simulink.VariantManager.activateModel(
validates and activates the global workspace configuration on the model hierarchy. The
variant control variables must be defined in the base workspace or data dictionary used by
the model.modelName
)
Simulink.VariantManager.activateModel(
validates and activates the specified named variant configuration on the model
hierarchy.modelName
,Configuration=configName
)
Note
Activation of a variant configuration performed by this method differs from the Simulink update diagram process. See Differences Between Variant Manager Activation and Update Diagram Process.