Main Content

Simulink.VariantManager.getConfigurationData

Class: Simulink.VariantManager
Package: Simulink

Get variant configuration data object associated with model

Since R2022b

Description

Note

This method requires Variant Manager for Simulink®.

example

vcdo = Simulink.VariantManager.getConfigurationData(model) returns the variant configuration data object associated with the model model.

Input Arguments

expand all

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

Example: "slexVariantManagement"

Data Types: char | string

Output Arguments

expand all

Variant configuration data object associated with the model, returned as an object of the Simulink.VariantConfigurationData class.

Examples

expand all

Open the model slexVariantManagement.

model = 'slexVariantManagement';
open_system(model);

Get the existing variant configuration object for the model.

Simulink.VariantManager.getConfigurationData(model)
ans = 
  VariantConfigurationData with properties:

            Configurations: [1x6 struct]
               Constraints: [1x1 struct]
    PreferredConfiguration: ''

Get the name of variant configuration object associated with the model.

get_param(model, 'VariantConfigurationObject')
ans = 
'vcd'

Version History

Introduced in R2022b

expand all