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 tomodeland is namedconfigObjName. Before you activate a configuration, attach the configuration to the model by usingattachConfigSet.

Examples

collapse all

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

Open the modelsldemo_fuelsys.

sldemo_fuelsys

Create a configuration set namedConfig1and attach it to the model.

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

Activate theConfig1configuration 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'

Introduced before R2006a