Main Content

Simulink.VariantManager.getPreferredConfigurationName

Class: Simulink.VariantManager
Package: Simulink

Get name of preferred variant configuration for model

Since R2022b

Description

Note

This method requires Variant Manager for Simulink®.

example

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

Input Arguments

expand all

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

Example: "slexVariantManagement"

Data Types: char

Output Arguments

expand all

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

Examples

expand 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);

Version History

Introduced in R2022b