Documentation

Model Explorer Overview

What You Can Do Using the Model Explorer

Use the Model Explorer to view, modify, and add elements of Simulink® models, Stateflow® charts, and workspace variables. The Model Explorer lets you focus on specific elements (for example, blocks, signals, and properties) without navigating through the model or chart.

Opening the Model Explorer

To open the Model Explorer, use one of these approaches:

  • From the Simulink Editor View menu, select Model Explorer or select the Model Explorer icon from the toolbar.

  • In an open model in the Simulink Editor, right-click a block and from the context menu, select Explore.

  • In an open Stateflow chart, right-click in the drawing area and from the context menu, select Explore.

  • At the MATLAB® command line, enter daexplr.

Basic Steps for Using the Model Explorer

Use the Model Explorer to perform a wide range of activities relating to viewing and changing model and chart elements. You can perform activities in any order, using panes in the order you choose. Your actions in one pane often affect other panes.

For example, if you want to edit properties of objects in a model, you might use a general workflow such as:

  1. Open a model.

  2. Open the Model Explorer.

  3. Select the model in the Model Hierarchy pane, specifying whether the Model Explorer displays only the current system or the whole system hierarchy of the current system

  4. Control the model information the Contents pane displays, and how it displays that information, by using a combination of:

    • The View > Column View option to control which property columns to display

    • The View > Row Filter option to control which types of objects to display

    • Techniques to directly manipulate column headings

  5. Identify model elements with specific values, using the search bar.

  6. Edit the values for model elements, in either the Contents pane or the Dialog pane. To edit workspace variables, you can use the Variable Editor.

Model Explorer Components

By default, the Model Explorer opens with three panes (Model Hierarchy, Contents, and Dialog), a main toolbar, and a search bar.

ComponentPurposeDocumentation
Main toolbarExecute Model Explorer commandsThe Main Toolbar
Search barPerform a search within the context of the selected node in Model Hierarchy pane.Search Bar Controls
Model Hierarchy paneNavigate and explore model, chart, and workspace nodesModel Explorer: Model Hierarchy Pane
Contents paneDisplay and modify model or chart objectsModel Explorer: Contents Pane
Dialog paneView and change the details of object propertiesModel Explorer: Property Dialog Pane

The Main Toolbar

The main toolbar at the top of the Model Explorer provides buttons you click to perform Model Explorer operations. Most of the toolbar buttons perform actions that you can also perform using Model Explorer menu items.

The toolbar buttons in the following table perform actions that you cannot perform using Model Explorer menus:

ButtonUsage

Bring the MATLAB window to the front.

Display the Simulink Library Browser.

If you have Simulink Verification and Validation™ installed, you can use additional toolbar buttons relating to requirements links.

Adding Objects

You can use the Model Explorer to add many kinds of objects to a model, chart, or workspace. The types of objects that you can add depend on the node you select in the Model Hierarchy pane. Use toolbar buttons or the Add menu to add objects. The Add menu lists the types of objects you can add.

Customizing the Model Explorer Interface

You can customize the Model Explorer interface in several ways. This section describes how to show or hide the toolbars and how to control the font size.

Other ways you can customize the Model Explorer interface include:

Showing and Hiding Toolbars

To show or hide toolbars, in the Model Explorer select View > Toolbars, and then select the toolbar you want to hide from the menu.

Controlling the Font Size

You can change the font size in the Model Explorer panes:

  • To increase the font size, press the Ctrl + Plus Sign (+).

    Alternatively, from the Model Explorer View menu, select Increase Font Size.

  • To decrease the font size, press the Ctrl + Minus Sign (-).

    Alternatively, from the Model Explorer View menu, select Decrease Font Size.

    Note   The changes remain in effect for the Model Explorer and in the Simulink dialog boxes across Simulink sessions.

Search Bar Controls

The search bar includes these controls:

Search Type

Use the Search Type control to specify the type of objects or properties to include in the search.

Search Type OptionDescription
by NameSearches a model or chart for all objects that have the specified string in the name of the object. See Search Strings.
by Property NameSearches for objects that have a specified property. Specify the target property name from a list of properties that objects in the search domain can have.
by Property Value

Searches for objects with a property value that matches the value you specify. Specify the name of the property, the value to be matched, and the type of match (for example, equals, less than, or greater than). See Search Strings.

by Block Type

Searches for blocks of a specified block type. Select the target block type from the list of types contained in the currently selected model.

by Stateflow Type

Searches for Stateflow objects of a specified type.

for Variable Usage

Searches for blocks that use variables defined in a workspace. Select the base workspace or a model workspace (model name) and, optionally, the name of a variable. See Search Strings.

for Referenced Variables

Searches for variables that a model or block uses. Specify the name of the model or block in the by System field. The model or block must be in the Model Hierarchy pane.

for Unused Variables

Searches for variables that are defined in a workspace but not used by any model or block. Select the name of the workspace from the drop-down list for the in Workspace field.

for Library Links

Searches for library links in the current model.

by Class

Searches for Simulink objects of a specified class.

for Fixed Point Capable

Searches a model for all blocks that support fixed-point computations.

for Model References

Searches a model for references to other models.

by Dialog Prompt

Searches a model for all objects whose dialogs contain the prompt you specify. See Search Strings.

by String

Searches a model for all objects in which the string you specify occurs. See Search Strings.

Search Options

Use the Search Options control to specify the scope and how to apply search strings.

Search OptionDescription
Match Whole String

Do not allow partial string matches (for example, do not allow sub to match substring).

Match Case

Considers case when matching strings (for example, Gain does not match gain).

Regular Expression

Considers a string to be matched as a regular expression.

Evaluate Property Values During Search

Applies only for searches by property value. If enabled, Model Explorer evaluates the value of each property as a MATLAB expression and compares the result to the search value. If this option is disabled (the default), the Model Explorer compares the unevaluated property value to the search value.

Refine Search

Initiates a secondary search that provides additional search criteria to refine the initial search results. The second search operation searches for objects that meet both the original and the new search criteria.

Search Strings

By default, search strings are case-insensitive and are treated as regular expressions.

By default, the search allows partial string matches. You cannot use wildcard characters in search strings. For example, if you enter *1 as a name search string, you get no search results unless there is an item whose name starts with the two characters *1. If there is an out1 item, the search results do not include that item.

Focusing on Specific Elements of a Model or Chart

As you explore a model or chart, you might want to narrow the contents that you see in the Model Explorer to particular elements of a model or chart. You can use several different techniques. The table summarizes techniques for controlling the content the Model Explorer displays and how the contents appear.

TechniqueWhen to UseDocumentation

Show partial or whole model hierarchy contents

To control how much of a hierarchical model to display

Displaying Partial or Whole Model Hierarchy Contents

Use the Row Filter option

To focus on, or hide, a specific kind of a model object, such as signals

Using the Row Filter Option

Search

To find objects that might not be currently displayed

Search Using Model Explorer

Filter contents

To focus on specific objects in the Contents pane, based on a search string

Filtering Contents

Once you have the general set of data that you are interested in, you can use the following techniques to organize the display of contents.

TechniqueWhen to UseDocumentation

Sort

To quickly organize data for a property in ascending or descending order

Sorting Column Contents

Group by property column

To logically group data based on values for a property

How to Group by a Property Column

Use column views

To display a named subset of property columns to apply to different kinds of nodes in the Model Hierarchy pane

Control Model Explorer Contents Using Views

Add, delete, or rearrange property table columns

To customize property columns

Organize Data Display in Model Explorer

Related Examples

More About

Was this topic helpful?