Simulink Reference Previous page   Next Page
Simulink.ConfigSet

Access a model configuration set.

Description

Instances of this handle class allow you to write programs to create, modify, and attach configuration sets to models. See the Configuration Set API for more information.

Property Summary

Name
Description
Components
Components of the configuration set.
Description
Description of the configuration set.
Name
Name of the configuration set.
SimulationMode
Mode used to simulation this configuration.

Method Summary

Name
Description
attachComponent
Attach a component to a configuration set.
copy
Create a copy of a configuration set.
getComponent
Get a component of a configuration set.
getFullName
Get full path name of a configuration set.
getModel
Get the handle of the model that owns a configuration set.
get_param
Get the value of a configuration set parameter.
isActive
Determine whether a configuration set is the active set of the model that owns it.
isValidParam
Determine whether a specified parameter is a valid parameter of a configuration set.
setPropEnabled
Prevent or allow a user to change a parameter.
set_param
Set the value of a configuration set parameter.

Properties


Components

Description:   Array of Simulink.ConfigComponent objects representing the components of the configuration set, e.g., solver parameters, data import/export parameters, etc.

Data Type:   array

Access:   RW



Description

Description:   Description of configuration set. You can use this property to provide additional information about a configuration set, such as its purpose.

Data Type:   string

Access:   RW



Name

Description:   Configuration set's name.

Data Type:   string

Access:   RW



SimulationMode

Description:   Model's simulation mode. Valid values are normal, accelerator, or external.

Data Type:   string

Access:   RW

Methods


attachComponent

Purpose:   Attach a component to this configuration set.

Syntax:   attachComponent(component)

Arguments:   
  

Description:   This method replaces a component in this configuration set with a component having the same name.

Example:   The following example replaces the solver component of the active configuration set of model A with the solver component of the active configuration set of model B.



copy

Purpose:   Create a copy of this configuration set.

Syntax:   copy

Description:   This method creates a copy of this configuration set.



getComponent

Purpose:   Get a component of this configuration set.

Syntax:   getComponent(componentName)

Arguments:   
  

Description:   Returns the specified component. Omit the argument to get a list of the names of the components that this configuration set contains.

Example:   The following code gets the solver component of the active configuration set of the currently selected model.

The following code displays the names of of the components of the currently selected model's active configuration set at the MATLAB command line.



getFullName

Purpose:   Get the full path name of a configuration set.

Syntax:   getFullName

Description:   This method returns a string specifying the full path name of a configuration set, e.g., 'vdp/Configuration'.



getModel

Purpose:   Get the model that owns this configuration set.

Syntax:   getModel

Description:   Returns a handle to the model that owns this configuration set.

Example:   The following command opens the block diagram of the model that owns the configuration set referenced by the MATLAB workspace variable hCs.



get_param

Purpose:   Get the value of a configuration set parameter.

Syntax:   get_param(paramName)

Arguments:   
  

Description:   This method returns the value of the specified parameter. config.get_param('ObjectParameters') returns the names of the valid parameters in the configuration set named config.

Example:   The following command gets the name of the solver used by the selected model's active configuration.



isActive

Purpose:   Determine whether this configuration set is its model's active configuration set.

Syntax:   isActive

Description:   Returns true if this configuration set is the active configuration set of the model that owns this configuration set.



isValidParam

Purpose:   Determine whether a specified parameter is a valid parameter of this configuration set. A parameter is valid if it is compatible with other parameters in the configuration set. For example, if SolverType is set to 'variable-step', FixedStep is an invalid parameter.

Syntax:   isValidParam(paramName)

Arguments:   
  

Description:   This method returns true if the specified parameter is a valid parameter of this configuration set; otherwise, it returns false.

Example:   The following code sets the parameter StopTime only if it is a valid parameter of the currently selected model's active configuration set.



setPropEnabled

Purpose:   Enable a configuration set parameter to be changed.

Syntax:   setPropEnabled(paramName, isEnabled)

Arguments:   
  

Description:   This method sets the enabled status the parameter specified by paramName to the value specified by isEnabled. Disabling a parameter prevents the user from changing it.

Example:   The following code prevents the user from setting the simulation stop time of the currently selected model.



set_param

Purpose:   Set the value of a configuration set parameter.

Syntax:   set_param(paramName, paramValue)

Arguments:   
  

Description:   This method sets the configuration set parameter specified by paramName to the value specified by paramValue.

Example:   The following command sets the simulation stop time of the selected model's active configuration.


Previous page  Simulink.BusElement Simulink.ModelDataLogs Next page

© 1994-2005 The MathWorks, Inc.