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: string

Default: Empty String

Description

Specifies the block description of the associated block.

Type: string

Default: Empty String

Help

Specifies the help text that is displayed for the mask.

Type: string

Default: Empty String

Initialization

Specifies the initialization commands for the associated block.

Type: string

Default: Empty String

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: string

Default: Empty String

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: boolean

Values: 'on'|'off'

Default: ‘off'

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

addDialogControlAdd a dialog control to the mask
addParameterAdd a parameter 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
getDialogControlSearch for a specific dialog control on the mask
getDialogControlsSearch for all mask dialog controls
getOwnerDetermine the block that owns a mask
getParameterGet a mask parameter using its name
getWorkspaceVariablesGet all the variables defined in the mask workspace for a masked block
numParametersDetermine the number of parameters in a mask
removeAllParametersRemove all existing parameters from a mask
setSet the properties of an existing mask
Was this topic helpful?