Main Content

Navigate Model Hierarchies

Model components, such as subsystems and referenced models, allow you to create a hierarchical model composed of many layers. You can navigate this hierarchy by opening model components in the current tab, new tabs, and new windows.

For information on the types of model components, seeChoose Among Types of Model Components.

Open Model Component in Current Tab

To navigate among model components in the current tab, perform any of these actions:

  • Double-click a block that corresponds to a model component in the Simulink®Editor. For example, double-click aSubsystemorModelblock.

  • Click a block name in the Model Browser.

    打开模型浏览器,点击Hide/Show Model BrowserbuttonHide/Show Model Browserat the bottom left corner of the window. Expand a node to see the children of a component.

  • In the explorer bar that appears above the Simulink Editor canvas, click the name of a component.

  • Use theBack,Forward, andUp to ParentarrowsThree adjacent buttons: Back, Forward, and Up to Parent..

A referenced model is open in the current tab.

The address bar provides the path from the top model in the hierarchy to the component you have open. In this example, the address bar shows the top model (sldemo_mdlref_depgraph) followed by theModel块(outdoor temp) and its referenced model (sldemo_mdlref_outdoor_temp).

When you navigate up to a parent subsystem or model, the model component from which you navigated is highlighted.

Open Model Component in New Tab

To open a model component in a new tab, pressCtrlwhile double-clicking the block or clicking the node in the Model Browser. Alternatively, right-click the block in the Simulink Editor or the block name in the Model Browser. Then, selectOpen In New Tab.

A referenced model is open in a new tab.

Open Model Component in New Window

To open a model component in a new window, pressShiftwhile double-clicking the block or clicking the node in the Model Browser. Alternatively, right-click the block in the Simulink Editor or the block name in the Model Browser. Then, selectOpen In New Window.

A referenced model is open in a new window in the context of its parent model.

在新窗口打开引用模型作为顶级模特

To open a referenced model as a top model in a new window, click theOpen As Top Modelbadge on theModelblock. To open a referenced model that does not have a visibleModelblock, right-click the block name in the Model Browser, and selectOpen As Top Model.

A referenced model is open in a new window as the top model in the model hierarchy.

The top model in the new window issldemo_mdlref_outdoor_temp, notsldemo_mdlref_depgraph. The Model Browser shows the models in the current model hierarchy.

When you selectRunin the toolstrip, thesldemo_mdlref_outdoor_tempmodel hierarchy simulates.

When you edit thesldemo_mdlref_outdoor_tempmodel, the changes affect the same model file regardless of whether the model is open as a referenced model or top model.

Related Topics