Submodel Block

Description

The Submodel block creates hierarchical models and facilitates component reuse. It is similar to a compound block except for one key difference: the contents of a compound block are embedded in a model when it is created, whereas a Submodel block provides a linkage from the simulation model to its content definition. Once the content definition of a Submodel block is changed, all instances of the submodel, whether in the same simulation model or in different simulation models, reflect those changes.

You double-click a Submodel block to view and edit its content in a separate submodel window. The Instance option in the submodel window enables you to view (but not edit) the contents of a submodel. If you have a submodel window open and you double-click on another submodel block that is linked to the same submodel that is already open, then both instances are displayed in the same submodel window. Clicking the up and down arrows adjacent to the Instance option changes the submodel instance being viewed. The label that is associated with each submodel instance is displayed. You can click the Close button to close the current submodel instance. The Instance option is especially useful for viewing the animation of a submodel instance as the model runs.

The Definition option in the submodel window enables you to edit the contents of a submodel. You can drag blocks into the submodel, connect blocks, delete blocks, and perform any other modeling action that you would perform in the regular Model window. To save an edited submodel block, right-click on the submodel and select Save. The default filename extension for a saved submodel block is .cblk. When the edited submodel definition is saved, all instances of that submodel in the currently open simulation model automatically refresh to reflect the new, updated definition.

To open the Submodel Block Properties dialog box, right-click on the Submodel block and select Block Properties.

Properties Dialog Box Controls

Submodel Path

Specifies the filename for the compound block (.cblk file) that is associated with this Submodel block.