Main Content

setActiveConfigSet

Specify active configuration set or configuration reference for model

Description

example

setActiveConfigSet(model, configObjName) activates the configuration set or configuration reference that is attached to model and is named configObjName. Before you activate a configuration, attach the configuration to the model by using attachConfigSet.

Examples

collapse all

Create a configuration set, attach it to a model, and activate it.

Open the Model a Fault-Tolerant Fuel Control System example model sldemo_fuelsys.

openExample('simulink_automotive/ModelingAFaultTolerantFuelControlSystemExample')
sldemo_fuelsys

Create a configuration set named Config1 and attach it to the model.

configObj = Simulink.ConfigSet;
set_param(configObj,'Name','Config1')
attachConfigSet('sldemo_fuelsys',configObj)

Activate the Config1 configuration set.

setActiveConfigSet('sldemo_fuelsys','Config1')

Input Arguments

collapse all

Name of model for which you want to activate a configuration set, specified as a character vector or string scalar. The model must be open.

Example: 'my_model'

Name of the configuration object that you want to activate, specified as a character vector or string scalar.

Example: 'Configuration'

Version History

Introduced before R2006a