Main Content

getConfiguration

Class: Simulink.VariantConfigurationData
Package: Simulink

Returns the variant configuration with a given name from a variant configuration data object

Syntax

vcdataObj.getConfiguration(nameOfConfiguration)

Description

vcdataObj.getConfiguration(nameOfConfiguration) returns a specific variant configuration that is associated with the variant configuration data object.

Input Arguments

nameOfConfiguration

Name of the variant configuration to be returned.

Examples

 % Define the variant configuration data object 
 vcdataObj = Simulink.VariantConfigurationData;

 % Add the variant configuration LinInterExp
 vcdataObj.addConfiguration('LinInterExp',...
   'Linear Internal Experimental Plant Controller');

 % Add a control variable SmartSensor1Mod
 vcdataObj.addControlVariables('LinInterExp',...
   [struct('Name','SmartSensor1Mod','Value','2')]);
 
 % Obtain information on the variant configuration..
 % LinInterExp from the variant configuration data object
 vc = vcdataObj.getConfiguration('LinInterExp')