This is machine translation

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

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Simulink.MaskParameter class

Package: Simulink

Control mask parameters programmatically

Description

Use an instance of Simulink.MaskParameter to set the properties of mask parameters.

Properties

Type

Specifies the mask parameter type.

Type: character vector

Values: 'edit'|'checkbox'|'popup'|'min'|'max'|'promote'|'combobox'|'radiobutton'|'unidt'|'slider'|'dial'|'spinbox'

Default: 'edit'

TypeOptions

Specifies the option for the parameter if it exists, otherwise, it is empty. Applicable for parameters of type popup, radio, Datatypestr, and promote .

Type: cell array of character vectors

Default: {''}

Name

Specifies the name of the mask parameter. This name is assigned to the mask workspace variable created for the mask parameter. The mask parameter name must not match the built-in parameter name.

Type: character vector

Default: Auto generated

Prompt

Specifies a character vector that appears as the label associated with the parameter on the mask dialog.

Type: character vector

Default: Empty character vector

Value

Specifies the value of the mask parameter.

Default: Depends on the type of the parameter.

Evaluate

Indicates if the parameter value is to be evaluated in MATLAB® or treated as a character vector when the block is evaluated.

Type: boolean

Values: 'on'|'off'

Default: 'on'

Tunable

Indicates if the parameter value can be changed during simulation.

Type: boolean

Values: 'on'|'off'

Default: 'on'

NeverSave

Indicates if the parameter value gets saved in the model file.

Type: boolean

Values: 'on'|'off'

Default: 'off'

Hidden

Indicates if the parameter should never show on the mask dialog box.

Type: boolean

Values: 'on'|'off'

Default: 'off'

ReadOnly

Indicates if the parameter on the mask dialog box is editable or is read-only.

Type: boolean

Values: 'on'|'off'

Default: 'off'

Enabled

Indicates if the parameter is enabled in the mask dialog box.

Type: boolean

Values: 'on'|'off'

Default: 'on'

Visible

Indicates if the parameter is visible in the mask dialog box.

Type: boolean

Values: 'on'|'off'

Default: 'on'

ShowTooltip

Indicates if tool tip is enabled for the mask parameter.

Type: boolean

Values: 'on'|'off'

Default: 'on'

Callback

Specifies the MATLAB code that executes when a user changes the parameter value from the mask dialog box.

Type: character vector

Default: Empty character vector

TabName

Specifies the tab name of the mask dialog box where the parameter is displayed.

Type: character vector

Default: Empty character vector

Alias

Specifies the alternate name for mask parameter.

Type: character vector

Default: Empty character vector

DialogControl

Specifies the layout options of mask dialog.

Type: Class of type Simulink.dialog.parameter.<Typeofparameter>

Values: 'edit'|'checkbox'|'popup'|'min'|'max'|'promote'|'combobox'|'radiobutton'|'unidt'|'slider'|'dial'|'spinbox'

Default: Edit

ConstraintName

Indicates the constraint associated with a parameter. To associate a constraint programmatically the constraint must be already available. To associate a constraint from a mat file use the format <matfilename>:<constraintname>.

Type: character vector

Default: Empty character vector

Methods

setSet properties of mask parameters