Main Content

Simulink.BlockDiagram.loadActiveConfigSet

Load, associate, and activate configuration set with model

Description

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

example

Examples

collapse all

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

Open the Model Fault-Tolerant Fuel Control System example model sldemo_fuelsys. Save the active configuration set to a file.

openExample('simulink_automotive/ModelingAFaultTolerantFuelControlSystemExample')
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.

openExample('simulink_general/VanDerPolOscillatorExample');
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.

Version History

Introduced in R2010b