Main Content


Dissociate configuration set or configuration reference from model



configObj = detachConfigSet(model, configObjName) dissociates the configuration set or configuration reference with the name configObjName from the model. The function returns the detached configuration as a Simulink.ConfigSet object or a Simulink.ConfigSetRef object. You cannot detach the active configuration from a model. When you want to detach the active configuration, first activate a different configuration for the model.


collapse all

Create, attach, and activate a configuration set for a model. Then, detach the default configuration set from the model.

Open the Model Fault-Tolerant Fuel Control System example model sldemo_fuelsys. Create a configuration set named 'MyConfig' and attach it to the model.

configObj = Simulink.ConfigSet;

The active configuration for sldemo_fuelsys is the default configuration set, Configuration. To detach Configuration, activate another configuration for the model. For this example, set MyConfig as the active configuration set for sldemo_fuelsys.


Detach the default configuration set Configuration from the model.


Input Arguments

collapse all

Model from which to disassociate a configuration set, specified as a character vector or string scalar. The model must be open.

Example: 'my_model'

Name of the configuration object to detach from the model, specified as a character vector or string scalar.

Example: 'Configuration'

Version History

Introduced in R2006a