Main Content

setDefaultConfigurationName

Class: Simulink.VariantConfigurationData
Package: Simulink

Set name of the default variant configuration for a variant configuration data object

Syntax

vcdataObj.setDefaultConfigurationName(nameOfConfiguration)

Description

vcdataObj.setDefaultConfigurationName(nameOfConfiguration) sets the default configuration name. A variant configuration must exist with the same name. If an empty value is passed, then the default configuration name is cleared.

Input Arguments

nameOfConfiguration

Name of the configuration to be set as the default.

Examples

% Define the variant configuration data object
vcdataObj = Simulink.VariantConfigurationData;
  
% Add the LinInterExp variant configuration
vcdataObj.addConfiguration('LinInterExp',...
  'Linear Internal Experimental Plant Controller');
  
% Set the configuration LinInterExp as default
vcdataObj.setDefaultConfigurationName('LinInterExp');

% Obtain the default variant configuration
dconfig = vcdataObj.getDefaultConfiguration