Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

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

Default: Empty character vector

Description

Specifies the block description of the associated block.

Type: character vector

Default: Empty character vector

Help

Specifies the help text that is displayed for the mask.

Type: character vector

Default: Empty character vector

Initialization

Specifies the initialization commands for the associated block.

Type: character vector

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

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

addDialogControlAdd dialog control elements to mask dialog box
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
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
removeDialogControlRemove dialog control element from mask dialog box
removeParameterRemove parameter from mask dialog box
setSet the properties of an existing mask
Was this topic helpful?