Main Content

Inspect Model Hierarchies

To better understand a model hierarchy, you can use Simulink®tools, functions, parameters, or preferences to:

  • Preview model contents

  • Visualize the model hierarchy

  • List referenced models andModelblocks

  • Display model version numbers

Content Preview

Content preview displays a representation of the contents of a referenced model on theModelblock. This preview helps you to understand at a glance the kind of processing performed by the referenced model without opening the referenced model. SeePreview Content of Model Components.

Model block with content preview enabled

Model Dependency Graph

The Dependency Analyzer shows the structure of the model hierarchy and lets you open constituent models. TheModel Instancesview displaysModelblocks differently to indicate Normal, Accelerator, SIL, and PIL modes. SeeAnalyze Model Dependencies.

Dependency Analyzer results for sldemo_mdlref_depgraph. A legend provides colors to identify the top model and simulation modes of the referenced models.

Thedepviewfunction opens the model dependency graph.

List of Model References

Thefind_mdlrefsfunction lists all models that are directly or indirectly referenced by a given model. This function also provides the paths to the relatedModelblocks.

Find Referenced Models in Model Hierarchy

Find referenced models and Model blocks for all models referenced by the specified model.

load_system('sldemo_mdlref_basic'); [myModels,myModelBlks] = find_mdlrefs('sldemo_mdlref_basic')
myModels =2x1 cell{'sldemo_mdlref_counter'} {'sldemo_mdlref_basic' }
myModelBlks =3x1 cell{'sldemo_mdlref_basic/CounterA'} {'sldemo_mdlref_basic/CounterB'} {'sldemo_mdlref_basic/CounterC'}

Model Version Numbers

To display the version numbers of referenced models, in the parent model, on theDebugtab, clickInformation Overlays, then underBlocks, selectRef. Model Version. The version of eachModelblock instance appears on eachModelblock.

Three Model blocks display the same version number (Rev = 1.78).

For information on model versions, seeManage Model Versions and Specify Model Properties.

See Also

Functions

Related Topics