Link model to freestanding configuration set
ConfigSetRef object to allow a model to reference
configuration sets that are not saved in a model.
ConfigSetRef object by using the
getConfigSet function to call a
model configuration reference by name.
Description— Description of configuration reference
Description of the configuration reference, specified as a character vector. Use this property to provide additional information about a configuration reference, such as its purpose. This field can remain blank.
Name— Name of configuration reference
Name of the configuration reference, specified as a character vector. This name represents the configuration reference in the Model Explorer.
SourceName— Variable that contains referenced configuration set
Name of the variable in the workspace or the data dictionary that contains the referenced configuration set, specified as a character vector.
ConfigSetRef object to allow a model
to use a freestanding configuration set, which is not associated with a
Open the model
vdp. Create a freestanding configuration
set by copying the configuration set of the model.
model = 'vdp'; open_system(model) freeConfigSet = copy(getActiveConfigSet(model));
Create a configuration reference. To point the reference to your
freestanding configuration, set the
freeConfigSet, the base workspace variable that
represents your configuration. Name the reference
configRef = Simulink.ConfigSetRef; set_param(configRef,'SourceName','freeConfigSet'); set_param(configRef,'Name','vdpConfigRef');
Attach the configuration reference to the
vdp model and