Main Content

getDefaultConfiguration

Class: Simulink.VariantConfigurationData
Package: Simulink

Returns default variant configuration, if any, for a variant configuration data object

Syntax

vcdataObj.getDefaultConfiguration

Description

vcdataObj.getDefaultConfiguration returns the default variant configuration. If no default variant configuration is defined, then [] is returned.

Examples

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

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

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

% Set LinExtExp as the default variant configuration
vcdataObj.setDefaultConfigurationName('LinExtExp');
  
% Obtain the default variant configuration
defvc = vcdataObj.getDefaultConfiguration