Main Content

getPreferredConfiguration

Class: Simulink.VariantConfigurationData
Namespace: Simulink

Get name of preferred variant configuration for variant configuration data object

Since R2022b

Description

Note

This method requires Variant Manager for Simulink®.

configname = vcdataObj.getPreferredConfiguration() gets the name of the preferred variant configuration for the Simulink.VariantConfigurationData object vcdataObj.

example

Output Arguments

expand all

Name of the preferred variant configuration, returned as a character vector or string.

Data Types: char | string

Examples

expand all

Open the model slexVariantManagement.

model = 'slexVariantManagement';
open_system(model);

Get the variant configuration data object associated with the model.

vcdataobj = Simulink.VariantManager.getConfigurationData(model);

Get the name of the preferred variant configuration for the variant configuration data object.

configname = vcdataobj.getPreferredConfiguration();

Version History

Introduced in R2022b