Main Content

getPreferredConfiguration

Class: Simulink.VariantConfigurationData
Package: Simulink

Get name of preferred variant configuration for variant configuration data object

Description

Note

This method requires Variant Manager for Simulink®.

example

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

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