Main Content

getFor

Class: Simulink.VariantConfigurationData
Package: Simulink

Get existing variant configuration data object for a model

Syntax

Simulink.VariantConfigurationData.getFor(modelNameOrHandle)

Description

Simulink.VariantConfigurationData.getFor(modelNameOrHandle), returns the variant configuration object for the model. If no default variant configuration is defined, then [] is returned.

Input Arguments

modelNameOrHandle

Model name or handle.

Examples

% Add the path to the model file
addpath(fullfile(docroot,'toolbox','simulink','examples'));

% Load the model
load_system('slexVariantManagement');

% Obtain variant configuration data object for the model
% slexVariantManagement
vcdataObj = Simulink.VariantConfigurationData.getFor...
  ('slexVariantManagement')