Main Content

getFor

Class: Simulink.VariantConfigurationData
Package: Simulink

Get existing variant configuration data object for a model

Syntax

Simulink.VariantConfigurationData.getFor(modelNameOrHandle)

Description

Simulink.VariantConfigurationData.getFor(modelNameOrHandle), returns the variant configuration object for the model. If no default variant configuration is defined, then [] is returned.

Input Arguments

modelNameOrHandle

Model name or handle.

Examples

expand all

Open the model slexVariantManagement.

model='slexVariantManagement';
open_system(model);

Get the existing variant configuration object for the model.

Simulink.VariantConfigurationData.getFor(model)
ans = 
  VariantConfigurationData with properties:

       VariantConfigurations: [1x6 struct]
                 Constraints: [1x1 struct]
    DefaultConfigurationName: ''

Get the name of variant configuration object associated with the model.

get_param(model,'VariantConfigurationObject')
ans = 
'vcd'