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'|'combobox'|'listbox'|'radiobutton'|'slider'|'dial'|'spinbox'|'unit'|'textarea'|'customtable'|'unidt'|'min'|'max'|'promote'

Default: 'edit'

TypeOptions

Specifies the option for the parameter if it exists, otherwise, it is empty. Applicable for parameters of type popup, radio, textarea, combobox, 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. Masking supports all value types.

Default: Default value depends on the type of mask parameter. For example, the default value for Checkbox is 'on' while the default value for Listbox is {''} and accepts a cell array of character vectors.

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'|'Combobox'|'Listbox'|'RadioButton'|'Slider'|'Dial'|'Spinbox'|'Unit'|'TextArea'|'CustomTable'|'Min'|'Max'

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