validateModel
Class: Simulink.VariantConfigurationData
Namespace: Simulink
(To be removed) Validate and activate variant blocks in a model hierarchy
validateModel
will be removed in a future release. Use Simulink.VariantManager.activateModel
instead.
Syntax
Description
The validateModel
method allows you to validate and activate a variant
configuration on a model hierarchy. You can activate a named variant configuration defined for
the model or the 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. Activating a configuration:
Checks if applicable constraints are satisfied
Applies the variant control variable values defined in the configuration on the model
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
[
,
where valid
,errors
] = vcdataObj.validateModel(modelName
)vcdataObj
is an object of the
Simulink.VariantConfigurationData
class, returns the result of validating
and activating the workspace configuration on the model hierarchy. The variant control
variables must be defined in the base workspace or data dictionary used by the model.
[
returns the result of validating and activating the specified named variant configuration on
the model hierarchy.valid
,errors
] = vcdataObj.validateModel(modelName
,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.