You can double-click a submodel block to view its contents in a separate submodel window. Figure 7.9 shows a model with one submodel block and the submodel window open.
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, already open submodel, then both instances are displayed in the same submodel window. You can click the up and down arrows in the dialog box to the right of the Instance option to view the instances. The label associated with each submodel instance is displayed. The Instance option is especially useful for viewing the animation as the model runs. The Instance option prevents you from having to open a separate window for each submodel instance.
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 opened simulation model automatically
refresh to reflect the new, updated definition.
Figure 7.9: A Submodel Block and the Submodel Window