Package: Simulink.BlockDiagram

Save active configuration set of model


Simulink.BlockDiagram.saveActiveConfigSet(model, filename)


Simulink.BlockDiagram.saveActiveConfigSet(model, filename) saves the active configuration set of a model to a .m or .mat file. model is the name or handle of the model. filename is the name of the file to save the model configuration set. If you specify a .m extension, the file contains a function that creates a configuration set object. If you specify a .mat extension, the file contains a configuration set object. If you do not provide a file extension, the active configuration set is saved to a file with a .m extension. Do not specify filename to be the same as a model name; otherwise the software cannot determine which file contains the configuration set object when loading the file.


If you specify a .mat extension when you save the active configuration set, all of the parameters are preserved. If you specify a .m extension, the .m file does not include hidden or disabled parameters.


Save the configuration set from the sldemo_counters model to my_config_set.m.

% Open the sldemo_counters model
% Save the active configuration set to my_config_set.m
Simulink.BlockDiagram.saveActiveConfigSet('sldemo_counters', 'my_config_set.m')

Introduced in R2010b