Main Content

Simulink.VariantManager.getPreferredConfigurationName

Get name of preferred variant configuration for model

Since R2022b

Description

example

configName = Simulink.VariantManager.getPreferredConfigurationName(model) returns the name of the preferred variant configuration for the model model.

Note

To use this function, you must install the Variant Manager for Simulink® support package.

Examples

collapse all

Open the model slexVariantManagement.

model = 'slexVariantManagement';
open_system(model);

Get the name of the preferred variant configuration for the variant configuration data object associated with this model.

configname = Simulink.VariantManager.getPreferredConfigurationName(model);

Input Arguments

collapse all

Name of the model, specified as a character vector or string.

Example: "slexVariantManagement"

Data Types: char

Output Arguments

collapse all

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

Version History

Introduced in R2022b