Main Content

Navigate Model Hierarchy

You can use these model components to create a hierarchical model composed of many layers. For more information about model components, see Explore Types of Model Components.

ComponentDefinitionExampleMore Information
Subsystem blockBlock that contains a subset of a model.

Subsystem block

Group Blocks into Subsystems
Subsystem Reference blockBlock that references a subsystem saved in a file. By referencing a subsystem, you can reuse it in any model without copying over the block diagram.

Subsystem Reference block

Create and Use Referenced Subsystems in Models
Linked blockInstance of a masked library block or of a Subsystem block from a library.

Linked library block

Linked Blocks
Model blockBlock that references a model file. By referencing a model, you can reuse its contents in other models without copying over the block diagram.

Model block

Chart blockFlow charts that contain Stateflow® model elements such as states and transitions.

Chart block

Chart (Stateflow)

The hierarchy can have multiple levels. For example, a Subsystem block can contain any of the listed model elements, including other Subsystem blocks.

Entering a component takes you one level deeper in the hierarchy. You can move through the hierarchy one level at a time, or you can skip around. You can open levels of the hierarchy in the current tab, in new tabs, or in new windows.

To navigate simple model hierarchies or small ranges of levels in complex hierarchies, navigate down in the canvas and up using the Explorer Bar.

Use the Model Browser to perform these actions:

  • Skip levels when navigating down the hierarchy.

  • Navigate large ranges of levels in complex model hierarchies.

  • View the contents of a higher level in a new tab or a new window.

  • Open a referenced model that does not have a visible Model block.

When you simulate a model, the whole hierarchy simulates, regardless of which level you are viewing.

Navigate Down in Canvas

To navigate down one level in the hierarchy in the canvas, perform these actions:

How to View the Level You Navigate ToAction
In the current tabDouble-click the component you want to enter.
In a new tabPress Ctrl (Command on a Mac) and double-click the component you want to enter.
In a new windowPress Shift and double-click the component you want to enter.

For example, to view the contents of a subsystem in the current tab, double-click the Subsystem block.

If the subsystem you want to enter is masked, click the down arrow in the lower left corner of the block icon instead.

Navigate Up Using Explorer Bar

To navigate up in the hierarchy, in the Explorer Bar that appears above the Simulink® canvas, click the name of the model component whose top level you want to see.

For example, suppose the sldemo_fuelsys model is open. You are in the top level of the Throttle subsystem, and you want to navigate directly up to the top level of the Engine Gas Dynamics subsystem. In the Explorer Bar, click Engine Gas Dynamics.

The explorer bar shows this model hierarchy: sldemo_fuelsys → Engine Gas Dynamics → Throttle & Manifold → Throttle. The pointer is paused over Engine Gas Dynamics.

When you use the Explorer Bar, the higher level you navigate to opens in the current tab.

To open a higher level in a new tab or a new window, use the Model Browser.

Navigate by Selecting Destination in Model Hierarchy Tree

In the Model Browser, you can navigate directly to any level by selecting your destination in the model hierarchy tree. To view the Model Browser, at the bottom left corner of the Simulink Editor, click the Hide/Show Model Browser button . To view the hierarchy, expand the nodes of the tree.

To navigate to a level of the hierarchy, perform these actions.

How to View the Level You Navigate ToAction
In the current tab

Click your destination in the tree.

In a new tab

Press Ctrl (Command on a Mac) and click your destination in the tree.

In a new window

Press Shift and click your destination in the tree.

Tip

Alternatively, right-click your destination in the tree and select Open (in the current tab), Open in New Tab, or Open in New Window.

To hide or restore the Model Browser, click the Hide/Show Model Browser button .

To specify whether to display referenced models, library links, or systems with mask parameters in the tree, click Icon of Model Browser list for specifying which items to display.

In the Model Browser tree for the sldemo_fuelsys model, part of the tree is expanded. The Hide/Show Model Browser button is highlighted. The menu for selecting whether to display referenced models, library links or systems with mask parameters is expanded.

Navigate to Previously Viewed Level

To navigate to the level you last viewed, click the Back button located above the Explorer Bar.

To navigate forward to the next level you viewed, click the Forward button .

Navigate Up to Level of Parent Component

To navigate up to the level of the parent of a model component, click the Up to Parent button located above the Explorer Bar.

The model component from which you navigated highlights in the canvas.

Navigate to Library

To navigate from a linked block to its library, select the linked block and press Ctrl+L. Alternatively, select the block, then in the Simulink Toolstrip, on the block-specific tab (for example, the Subsystem Block tab), click the Go to Library button.

The library opens in a new window.

Open Referenced Model Outside Model Hierarchy

When you double-click a Model block, you open the referenced model in the context of the current model hierarchy.

To open a referenced model outside of the current model hierarchy, perform one of these actions:

  • On the Model block icon, click the Open As Top Model Open As Top Model badge.

  • When the referenced model does not have a visible Model block, in the Model Browser, right-click the block name. Then, select Open As Top Model.

The referenced model opens in the top model in a new window instead of as a referenced model. To use a referenced model as a standalone model, the referenced model must not depend on data in a higher-level model.

For more information, see Model Reference Hierarchy.

Related Topics