Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Simulink.BlockDiagram.loadActiveConfigSet

Package: Simulink.BlockDiagram

Load, associate, and activate configuration set with model

Syntax

Simulink.BlockDiagram.loadActiveConfigSet(model, filename)

Description

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.

Examples

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')

Tips

  • 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 (Simulink Coder) parameter to ert.tlc.

Introduced in R2010b

Was this topic helpful?