Main Content

Simulink.Mask.get

Class: Simulink.Mask
Namespace: Simulink

Returns mask from a specified block

Syntax

maskObj = Simulink.Mask.get(blockName)

Description

maskObj = Simulink.Mask.get(blockName) gets the mask on the specified block as a mask object. If the specified block is not masked, a null value returns.

Input Arguments

expand all

The path or handle to the block is specified as a character vector or string.

Data Types: char | string

Examples

Get mask from the block using block path.

openExample('simulink_masking/MaskLookupTableControlExample')
Simulink.Mask.get('slexMaskLookupTableControlExample/
LUT Control with Explicit Data');

You can also get the mask for the current block by using the gcb function to return the handle for the current block. To make a masked block the current block, select the masked block in the model.

Simulink.Mask.get(gcb);

Version History

Introduced in R2014a