Main Content

Simulink.BlockDiagram.loadActiveConfigSet

Load, associate, and activate configuration set with model

Description

example

Simulink.BlockDiagram.loadActiveConfigSet(model, file) loads a configuration set, attaches it to a model, and makes it the active configuration set for the model.

Examples

collapse all

Load a saved configuration set to a model and activate it.

Open the model sldemo_fuelsys and save the active configuration set to a file.

sldemo_fuelsys
Simulink.BlockDiagram.saveActiveConfigSet('sldemo_fuelsys', 'fuelsys_config_set.m')

Open the vdp model. Load the saved configuration set to vdp and activate it.

vdp
Simulink.BlockDiagram.loadActiveConfigSet('vdp', 'fuelsys_config_set.m')

Input Arguments

collapse all

Name or handle of the target model for which you want to use the configuration set, specified as a character vector or string scalar.

Example: 'my_model'

Name of the file that contains the configuration set, specified as a character vector or string scalar.

Example: 'configset.m'

Tips

  • If you load a configuration set with the same name as the active configuration set, Simulink® overwrites the active configuration set.

  • If you load a configuration set with the same name as an inactive configuration set associated with the model, Simulink detaches the inactive configuration from the model.

  • If you load a configuration set object that contains an invalid custom target, Simulink sets the System target file (Simulink Coder) parameter to ert.tlc.

Introduced in R2010b