convertDefaultToPreferred
Convert default variant configuration to preferred variant configuration
Since R2022b
Syntax
Description
DefaultConfiguration
property of a variant configuration data
object will be removed. Use the
PreferredConfiguration
property instead (since R2022b) to indicate the
configuration that is suited for the model for common workflows. If the variant configuration
data object associated with your model has a value set for the
DefaultConfiguration
property, you can use it to set the
PreferredConfiguration
property using the
convertDefaultToPreferred
function.
For more information, see DefaultConfigurationName and SubModelConfiguration properties will be removed.
Note
This function requires Variant Manager for Simulink®.
convertDefaultToPreferred(
sets the value of the varconfigdata
)PreferredConfiguration
property of
varconfigdata
to the value of the
DefaultConfiguration
property, and then clears the
DefaultConfiguration
property. varconfigdata
is
a Simulink.VariantConfigurationData
object.
convertDefaultToPreferred(
specifies options using one or more name-value arguments to additionally activate the
preferred variant configuration on varconfigdata
,model
,Name=Value
)model
by updating the callback
functions of the model.
The preferred variant configuration is not applied automatically when compiling or
simulating a model. You must apply the preferred configuration explicitly on the model, if
required. To additionally activate the preferred configuration on the model, you can set the
Name=Value
arguments in this function to add commands to the
PostLoadFcn
or InitFcn
callbacks or both.
Examples
Input Arguments
Name-Value Arguments
Version History
Introduced in R2022b