Main Content

Simulink.Mask class

Package:金宝app

Control masks programmatically

Description

Use an instance ofSimulink.Maskclass 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

艾莎指定初始化命令ciated 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:'pixels'|'autoscale'|'normalized'

Default:'autoscale'

Methods

addCrossParameterConstraint Add cross-parameter constraint
addDialogControl Add dialog control elements to mask dialog box
addParameter Add a parameter to a mask
addParameterConstraint Add parameter constraint to a mask
copy Copy a mask from one block to another
create Create a mask on a Simulink block
delete Unmask a block and delete the mask from memory
get Get a block mask as a mask object
getAssociatedParametersOfConstraint Get mask parameters associated with a constraint
getCrossParameterConstraint Get cross-parameter constraint
getDialogControl Search for a specific dialog control on the mask
getOwner Determine the block that owns a mask
getParameter Get a mask parameter using its name
getParameterConstraint Get mask parameter constraint properties
getWorkspaceVariables Get all the variables defined in the mask workspace for a masked block
numParameters 确定参数的数量在一个面具
removeAllCrossParameterConstraints Delete all cross-parameter constraints from a mask
removeAllParameterConstraints Delete all mask parameter constraints
removeAllParameters Remove all existing parameters from a mask
removeCrossParameterConstraint Delete a cross-parameter constraint
removeDialogControl Remove dialog control element from mask dialog box
removeParameter Remove parameter from mask dialog box
removeParameterConstraint Delete a mask parameter constraint
set Set the properties of an existing mask