| Contents | Index |
Instances of this handle class allow a model to reference configuration sets that exist outside any model. See Manage a Configuration Set, Overview, and Manage a Configuration Reference for more information.
Name | Description |
|---|---|
| Description | Description of the configuration reference. |
| Name | Name of the configuration reference. |
| WSVarName | Name of the workspace variable that contains the referenced configuration set. |
Note You can use the Configuration Reference dialog box to set the Name, Description, and WSVarName properties of a configuration reference. See Create and Attach a Configuration Reference for details. |
Name | Description |
|---|---|
| copy | Create a copy of a configuration reference. |
| getFullName | Get the full pathname of a configuration reference. |
| getModel | Get the handle of the model that owns a configuration reference. |
| get_param | Get the value of a configuration set parameter indirectly through a configuration reference. |
| getRefConfigSet | Get the configuration set specified by a configuration reference. |
| isActive | Determine whether a configuration reference is the active configuration object of the model. |
| refresh | Update configuration reference after any change to properties or configuration set availability. |
Description of the configuration reference. You can use this property to provide additional information about a configuration reference, such as its purpose. This field can remain blank.
string
RW
Name of the configuration reference. This name represents the configuration reference in the GUI.
string
RW
Name of the workspace variable that contains the referenced configuration set.
string
RW
Create a copy of this configuration reference.
copy
This method creates a copy of this configuration set.
Note You must use this method to create copies of configuration references. This is because Simulink.ConfigSetRef is a handle class. See Handle Versus Value Classes for more information. |
Get the full pathname of a configuration reference.
getFullName
This method returns a string specifying the full pathname of a configuration reference, e.g., 'vdp/Configuration'.
Get the model that owns this configuration reference.
getModel
Returns a handle to the model that owns this configuration reference.
The following command opens the block diagram of the model that owns the configuration set referenced by the MATLAB workspace variable hCr.
open_system(hCr.getModel);
Get the value of a configuration set parameter indirectly through a configuration reference.
get_param(paramName)
This method returns the value of the specified parameter from the configuration set to which the configuration reference points. To obtain this value, the method uses the value of WSVarName to retrieve the configuration set, then retrieves the value of paramName from that configuration set. Specifying paramName as 'ObjectParameters' returns the names of all valid parameters in the configuration set. If a valid configuration set is not attached to the configuration reference, the method returns unreliable values.
The inverse method, set_param, is not defined for configuration references. To obtain a parameter value through a configuration reference, you must first use the getRefConfigSet method to retrieve the configuration set from the reference, then use set_param directly on the configuration set itself.
You can also use the get_param model construction command to get the values of parameters of a model's active configuration set, e.g., get_param(bdroot, 'SolverName') gets the solver name of the currently selected model.
The following command gets the name of the solver used by the selected model's active configuration.
hAcs = getActiveConfigSet(bdroot);
hAcs.get_param('SolverName');Get the configuration set specified by a configuration reference
getRefConfigSet
Returns a handle to the configuration set specified by the WSVarName property of a configuration reference.
Determine whether this configuration set is its model's active configuration set.
isActive
Returns true if this configuration set is the active configuration set of the model that owns this configuration set.
Update configuration reference after any change to properties or configuration set availability
refresh
Updates a configuration reference after using the API to change any property of the reference, or after providing a configuration set that did not exist at the time the set was originally specified in WSVarName. If you omit executing refresh after any such change, the configuration reference handle will be stale, and using it will give incorrect results.

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |