Main Content

Preview Content of Model Components

To display a representation of the contents of a hierarchical model element, such as a subsystem, on the block, you can use content preview. Content preview helps you see the contents of a hierarchical element without navigating the hierarchy. Content preview shows blocks, signals, signal and block labels, sample time color coding, signal highlighting, and Stateflow® animations.

By default, content preview is on for new hierarchical elements. You can change this setting by using Simulink® Preferences. To open the Simulink Preferences dialog box, on the Modeling tab, select Environment > Simulink Preferences. On the Editor pane, you can clear the Content preview displays for new hierarchical elements option.

To toggle content preview for a hierarchical element, select the block that you want to enable or disable content preview for, and then on the Format tab, click Content Preview. Content preview settings for blocks apply across Simulink sessions.

In this figure, the Throttle & Manifold subsystem has content preview enabled.

Simulink scales the content preview to fit the size of the block. To improve the readability of the content preview, you can zoom in on or resize the block.

You can enable content preview on:

  • Subsystem blocks

  • Model blocks

  • Variant Subsystem blocks

  • Stateflow charts, subcharts, and graphical functions

In some cases, content preview does not appear when it is enabled. Content preview does not appear for:

  • Hierarchical block icons when they are smaller than their default size in the Library Browser

  • Masked blocks whose Icon transparency property is set to Opaque or Opaque with ports

  • Masked blocks that have a mask icon image

  • Subsystem blocks when they have the Read/Write permissions block parameter set to NoReadOrWrite

  • Model blocks whose referenced models are protected models

  • Model blocks whose referenced models are not loaded

  • Models that have the classic diagram theme enabled in Simulink Editor preferences

Note

A slight delay can occur when drawing models with many hierarchical elements that contain many blocks and have content preview enabled.

Programmatic Use

Parameter: ContentPreviewEnabled
Type: character vector
Value: 'on' | 'off'
Default: 'on'

See Also

| |