validateModel
Class: Simulink.VariantConfigurationData
Package: Simulink
Activate and validate all variant blocks in a model hierarchy
Syntax
Simulink.VariantConfigurationData.validateModel(modelName)
Simulink.VariantConfigurationData.validateModel(modelName,configName)
Description
Simulink.VariantConfigurationData.validateModel(
,
activates and validates the model and referenced models during simulation.modelName
)
Simulink.VariantConfigurationData.validateModel(
,
activates and validates the model and referenced models during simulation optionally using a
variant configuration.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 the Update Diagram Process.
Input Arguments
|
Name of the model |
|
Name of the configuration to be activated and validated |
Examples
Add the path to the model file.
addpath(fullfile(matlabroot,'examples','simulink_variants','main'));
Load the model.
load_system('slexVariantManagement');
Activate and validate the model
slexVariantManagement
using the configurationLinInterExpNoNoise
.[valid, errors] = Simulink.VariantConfigurationData.validateModel... ('slexVariantManagement','LinInterExpNoNoise')