Simulink.Mask.copy
Class: Simulink.Mask
Package: Simulink
Copy a mask from one block to another
Syntax
pSource = Simulink.Mask.get(srcBlockName)
pDest = Simulink.Mask.create(destBlockName)
pDest.copy(pSource)
Description
gets
the mask on the source block specified by pSource
= Simulink.Mask.get(srcBlockName)blockName
as
a mask object.
creates
an empty mask on the destination block specified by pDest
= Simulink.Mask.create(destBlockName)destBlockName
.
overwrites
the destination mask with the source mask.pDest.copy(pSource)
Input Arguments
|
The handle to the source block or the path to the source block inside the model. Note The source block should be masked.
|
|
The handle to the destination block or the path to the destination block inside the model. Note The destination block should have an empty mask. Otherwise, the copied mask will overwrite the non-empty mask.
|
Examples
Create an empty mask on the destination block using the block’s path.
pDest = Simulink.Mask.create('myModel/Subsystem');
Get source mask as an object using the source block’s path.
pSource = Simulink.Mask.get('myModel/Abs');
Make the destination mask a copy of the source mask.
pDest.copy(pSource);