Add Images in Masks
You can add images as icons on a Simulink® mask and save them along with the model.
Select a masked block and on the Block tab, click Add Image.
In the Add mask icon image dialog box, click Browse to select an image from your local repository.
Specify the position and size of the image within the block mask icon using Margin and Dimensions.
Select Save a copy of the image with model to save the image with the model.
Click Edit Icon to set the properties of the icon such as Opaque, Transparent, and Opaque with ports.
Click OK to save your changes.
You can remove an icon from the masked block. Select the masked block and on the Block tab, click Remove Image.
Store Mask Images Programmatically
Convert mask image to internal for one block. Where
block
is the name of the block.Simulink.Mask.convertToInternalImage(block)
Convert mask image to internal for the whole model. Where
modelName
is the name of the model.Simulink.Mask.convertToInternalImages(modelName)
Convert mask image to external for one block. Where
block
is the name of the block.Simulink.Mask.convertToExternalImage(block)