getDefaultConfiguration
Class: Simulink.VariantConfigurationData
Namespace: Simulink
(To be removed) Returns default variant configuration, if any, for a variant configuration data object
getDefaultConfiguration
will be removed in a future release. For more
information, see Version History.
Syntax
vcdataObj.getDefaultConfiguration
Description
vcdataObj.getDefaultConfiguration
returns the default variant
configuration for vcdataObj
, which is an object of the
Simulink.VariantConfigurationData
class. If no default variant configuration
is defined, then []
is returned.
Note
Setting a default variant configuration for a variant configuration data object is not recommended. Activate and validate the model using a specific variant configuration instead. If you set a default configuration, compiling or simulating the model will apply the default configuration irrespective of the variant control variable values in the base workspace or data dictionary associated with the model.
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('LinInterExp'); % Obtain the default variant configuration defvc = vcdataObj.getDefaultConfiguration
Version History
getDefaultConfiguration
will be removed
The getDefaultConfiguration
method will be removed in a future release.
Scripts which use this method continue to work with a warning.
Setting a default variant configuration for a variant configuration data object is not
recommended. If the variant configuration data object associated with your model has an
existing default configuration, you can convert it to the preferred variant configuration
using the convertDefaultToPreferred
method.
Version History
Introduced in R2013b