Simulink.Mask class

Package: Simulink

Control masks programmatically

Description

Use an instance of Simulink.Mask class to perform the following operations:

  • Create, copy, and delete masks.

  • Create, edit, and delete mask parameters.

  • Determine the block that owns the mask.

  • Obtain workspace variables defined for a mask.

Properties

Type

Specifies the mask type of the associated block.

Type: character vector | string scalar

Default: Empty character vector

Description

Specifies the block description of the associated block.

Type: character vector | string scalar

Default: Empty character vector

Help

Specifies the help text that is displayed for the mask.

Type: character vector | string scalar

Default: Empty character vector

Initialization

Specifies the initialization commands for the associated block.

Type: character vector | string scalar

Default: Empty character vector

SelfModifiable

Indicates that the block can modify itself and its content.

Type: boolean

Values: 'on'|'off'

Default: 'off'

Display

Specifies MATLAB® code for drawing the block icon.

Type: character vector | string scalar

Default: Empty character vector

IconFrame

Sets the visibility of the block frame. (Visible is on, Invisible is off).

Type: boolean

Values: 'on'|'off'

Default: 'on'

IconOpaque

Sets the transparency of the icon (Opaque is on, Transparent is off).

Type: boolean

Values: 'on'|'off'

Default: 'on'

RunInitForIconRedraw

Specifies whether Simulink® must run mask initialization before executing the mask icon commands.

Type: enum

Values: 'auto'|'on'|'off'

Default: 'auto'

IconRotate

Sets icon to rotate with the block.

Type: enum

Values: 'none'|'port'

Default: 'none'

PortRotate

Specifies the port rotation policy for the masked block.

Type: enum

Values: 'default'|'physical'

Default: 'default'

IconUnits

Specifies the units for the drawing commands.

Type: enum

Values: 'pixel'|'autoscale'|'normalized'

Default: 'autoscale'

Methods

addCrossParameterConstraintAdd cross-parameter constraint
addDialogControlAdd dialog control elements to mask dialog box
addParameterAdd a parameter to a mask
addParameterConstraintAdd parameter constraint to a mask
copyCopy a mask from one block to another
createCreate a mask on a Simulink block
deleteUnmask a block and delete the mask from memory
getGet a block mask as a mask object
getAssociatedParametersOfConstraintGet mask parameters associated with a constraint
getCrossParameterConstraintGet cross-parameter constraint
getDialogControlSearch for a specific dialog control on the mask
getOwnerDetermine the block that owns a mask
getParameterGet a mask parameter using its name
getParameterConstraintGet mask parameter constraint properties
getWorkspaceVariablesGet all the variables defined in the mask workspace for a masked block
numParametersDetermine the number of parameters in a mask
removeAllCrossParameterConstraintsDelete all cross-parameter constraints from a mask
removeAllParameterConstraintsDelete all mask parameter constraints
removeAllParametersRemove all existing parameters from a mask
removeCrossParameterConstraintDelete a cross-parameter constraint
removeDialogControlRemove dialog control element from mask dialog box
removeParameterRemove parameter from mask dialog box
removeParameterConstraintDelete a mask parameter constraint
setSet the properties of an existing mask