Masking a Model Block
You can use all techniques described in Roadmap for Masking Blocks to mask a model block, with one special
requirement. If a mask specifies the name of the model referenced
by a Model block, or by any Model block in a masked subsystem, the
name of the referenced model must be given literally, rather than
obtained by evaluating a workspace variable. This requirement exists
because Simulink updates model reference targets before evaluating
block parameters. Two ways to enforce the requirement are:
Use a Pop-Up control to specify the name of the referenced
model. Clear the control's Evaluate parameter
to cause the control to provide a textual rather than a numeric value.
This technique restricts the user to specifying one of a predefined
set of models.
Use an Edit control to specify the name of the referenced
model. Clear the control's Evaluate parameter
to cause the name that the user provides to be interpreted literally.
This technique allows the user to specify any model as the referenced
model.
See Defining Mask Parameters for
information about defining Pop-Up and Edit controls.
Note
The mask workspace of a Model block is not visible to the model
that it references. Any variables used by the referenced model must
resolve to workspaces defined in the referenced model, or to the MATLAB base
workspace. |
 | Creating a Block Mask | | Masks on Blocks in User Libraries |  |
Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
Get this Simulink Kit