Load, associate, and activate configuration set with model
Simulink.BlockDiagram.loadActiveConfigSet(model, filename) loads a configuration set, associates it with a model, and makes it the active configuration set. model is the name or handle of a model. filename is the name of the file (.m or .mat) that creates or contains a configuration set object to load. If you do not provide a file extension, it defaults to .m. If the file name is the same as a model name on the MATLAB® path, the software cannot determine which file contains the configuration set object and displays an error message.
Save the configuration set from the sldemo_counters model to my_config_set.m.
% Open the sldemo_counters model sldemo_counters % Save the active configuration set to my_config_set.m Simulink.BlockDiagram.saveActiveConfigSet('sldemo_counters', 'my_config_set.m')
Load the configuration set from my_config_set.m, associate it with the vdp model, and make it the active configuration set.
% Open the vdp model vdp % Load the configuration set from my_config_set.m, making it the active % configuration set for vdp. Simulink.BlockDiagram.loadActiveConfigSet('vdp', 'my_config_set.m')
If you load a configuration set with the same name as the active configuration set, the software overwrites the active configuration set.
If you load a configuration set with the same name as an inactive configuration set associated with the model, the software detaches the inactive configuration from the model.
If you load a configuration set object that contains an invalid custom target, the software sets the System target file parameter to ert.tlc.