Main Content


Class: Simulink.VariantConfigurationData
Namespace: Simulink

(To be removed) Add to a variant configuration the names of the configurations to be used for referenced models

addSubModelConfigurations will be removed in a future release. For more information, see Version History.




vcdataObj.addSubModelConfigurations(configName,subModelConfigs) associates a variant configuration in vcdataObj with the configurations that must be used for referenced models. vcdataObj is an object of the Simulink.VariantConfigurationData class and represents the variant configuration object of the parent model. subModelConfigs specifies names of the variant configurations to be used for referenced models.

Input Arguments

expand all

Name of variant configuration of top level model, specified as a character vector or string.

Example: "LinInterExpNoNoise"

Data Types: char | string

Vector of structures containing fields: ModelName, ConfigurationName. The names of referenced models must be unique and valid MATLAB® variable names and configuration names must be valid MATLAB variables.

Example: [struct('ModelName','slexVariantManagementExternalPlantMdlRef','ConfigurationName','LowFid')]

Data Types: struct

Version History

addSubModelConfigurations will be removed

The addSubModelConfigurations will be removed in a future release. Scripts which use this method continue to work with a warning.

Use the Simulink.VariantConfiguratonData.addComponentConfiguration or add the variant control variables used by referenced components in the model hierarchy to the variant configurations of the top-level model instead.

For existing models with an associated variant configuration object, variant control variables in the referenced model configuration will be automatically migrated to the configuration of the top-level model. You must save the variant configuration object using Variant Manager to fix related warnings.

For more information on setting up variant control variables for referenced components, see Compose Variant Configurations for Top Model Using Referenced Model Configurations.

Version History

Introduced in R2013b