主要内容

Simulink.VariantManager.getPreferredConfigurationName

R2026b

Get name of preferred variant configuration for model

Since R2022b

Description

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

example

Examples

collapse all

Open the model slexVariantManagement.

model = 'slexVariantManagement';
open_system(model);

Get the name of the preferred variant configuration for the variant configurations 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

expand all