Model Explorer
View, modify, and add elements of Simulink models, Stateflow charts, and workspace variables
Description
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.
Use the Model Explorer to search for:
Variables in workspaces and data dictionaries
Variable usage in a model
Instances of a type of block
Block parameters and parameter values
You can combine search criteria and iteratively refine the results. Search in the Model Explorer for model elements, starting with the node you select in the model hierarchy. You can search the entire model, in a particular system, or in a system and all the systems below it in the hierarchy. Using your search results, you can apply changes to multiple elements at once.
To manipulate model data (block parameters, signals, and states) in a searchable, sortable table, consider using the Model Data Editor. You can specify data attributes such as parameter values, signal names, and initial values for states.
To create, modify, and view the entries in a data dictionary, use the Model Explorer. See Edit and Manage Workspace Variables by Using Model Explorer and View and Revert Changes to Dictionary Data.
Open the Model Explorer
In the Simulink Toolstrip, on the Modeling tab, click Model Explorer.
In an open model in the Simulink Editor, right-click a block and select Explore.
In an open Stateflow chart, right-click the drawing area and select Explore.
Parameters
Search BarSearch
— Specify the type of objects or properties to include in the search
by Name
| by Property Name
| by Property Value
| by Block Type
| ...
Open the search bar by selecting View > Toolbars > Search Bar.
Use the Search setting to specify the type of objects or properties to include in the search.
Search Type Option | Description |
---|---|
by Name | Searches a model or chart for all objects that have the specified string in the name of the object. |
by Property Name | Searches 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). |
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. |
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. |
by String | Searches a model for all objects in which the string you specify occurs. |
Search Options
— Specify search strings
name | property | type | variables | ...
Use search option settings to specify the scope of the search.
Search Option | Description |
---|---|
Match Whole String | Do not allow partial string matches (for example, do not allow
|
Match Case | Considers case when matching strings (for example,
|
Regular Expression | Considers a string to be matched as a regular expression. |
Evaluate Property Values During Search | This option 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 Model Explorer compares the unevaluated property value to the search value. |
Refine Search | Enables you to search the initial search results. The second search operation searches for objects that meet both the original and the new search criteria. |
By default, search strings are case-insensitive and are treated as regular
expressions. 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 characters *1
. If there is an out1
item, the
search results do not include that item.
Simulink Root
— Display display nodes representing the MATLAB workspace, Simulink models, and Stateflow charts
node structure
Expand Simulink Root to display nodes representing the MATLAB workspace, Simulink models, and Stateflow charts that are in the current session.
Base Workspace
— MATLAB workspace
node structure
Base Workspace represents the MATLAB workspace. The MATLAB workspace is the base workspace for Simulink models and Stateflow charts. Variables defined in this workspace are visible to all open models and charts.
Expanding a model or chart node in the Model Hierarchy pane displays nodes representing the following elements, as applicable, for the models and charts you have open.
Node | Description |
---|---|
Configurations | Select the Configurations node to show the model's configuration sets and configuration references in the Contents pane. For information about adding, deleting, saving, and moving configuration sets, see Manage Configuration Sets for a Model. |
Model Workspace | For information about how to use the Model Explorer to work with model workspace variables, see these topics: |
External data | Expand the External Data node to display external data sources for the model, including the base workspace (if access is enabled), and data dictionaries. |
Top-level subsystems | Expand a node representing a subsystem to display underlying subsystems. |
Model blocks | Expand model blocks to show contents of referenced models. |
Stateflow charts |
|
Contents Pane
— Describe contents of node
table
The Contents pane displays one of two tables containing information about models and charts, depending on the tab that you select:
The Contents tab displays an object property table for the node that you select in the Model Hierarchy pane.
The Search Results tab displays the search results table.
You can also click Show Details to add and modify the columns that appear in the tables.
The Contents pane displays a table of model and chart object data.
In the Contents tab and in the Search Results tab:
Table columns correspond to object properties (for example,
Name
andBlockType
).The table displays the first two columns (the object icon and the
Name
property) persistently, so that these columns remain visible regardless of how far you scroll to the right.Table rows correspond to objects (for example, blocks, and states).
The objects and properties displayed in the Contents pane depend on:
The column view that you select in the Column View menu
The node that you select in the Model Hierarchy pane
The kind of object (for example, subsystem or chart) that you select in the Model Hierarchy pane
The View > Row Filter options that you select
The link next to Contents of at the top of the Contents pane links to the currently selected node in the Model Hierarchy pane. The model data displayed in the Contents pane reflects the setting of the Current System and Below option.
Column View
— Named set of properties
properties
The Model Explorer uses views to specify sets of property columns to display in the Contents pane.
Each kind of node in the Model Hierarchy pane displays specific properties in the Contents pane. For example, a Simulink model or subsystem node displays properties such as:
BlockType
(block type)OutDataTypeStr
(output data type)OutMin
(minimum value for the block output)
Generally, a column view does not contain the total set of properties for all the objects in a node. Specifying a subset of properties to display can streamline the task of exploring and editing model and chart object properties and increase the density of the data displayed in the Contents pane.
You can use a view to capture the following characteristics of the model information to show in the Model Explorer:
Properties that you want to display in the Contents pane
The layout of the Contents pane (for example, grouping by property, the order of property columns, and sorting)
You can use views in the following ways:
Use the standard views that ship with the Model Explorer
Customize the standard views
Create your own views
The first time you open the Model Explorer, Simulink automatically applies one of the standard views to the node you select in the Model Hierarchy pane. The Model Explorer applies a view based on the kind of node you select.
The Model Explorer assigns one of four categories of nodes in the Model Hierarchy pane. The Model Explorer initially associates a default view with each node category. The four node categories are:
Node Category | Kinds of Hierarchy Nodes Included | Initial Associated View |
---|---|---|
Simulink | Models, subsystems, and root level models | Block Data Types |
Workspace | Base and model workspace objects | Data Objects |
Stateflow | Stateflow charts and states | Stateflow |
Configurations | Configurations section node | Configurations |
Other | Objects that do not fit into one of the first three categories; for example, configuration sets | Default |
The Column View field at the top of the Contents pane displays the view that the Model Explorer is currently using.
In the Contents pane, from the Column View
list, you can select a different view. If you select a different view, then the Model
Explorer associates that view with the category of the current node. For example,
suppose the selected node in the Model Hierarchy pane is a
Simulink model, and the current view is Data Objects
. If you
change the view to Signals
, then when you select another Simulink model node, the Model Explorer uses the Signals
view.
By default, the Model Explorer automatically applies a view based on the category of node that you select and the last view used for that node. You can manually select a view from the Column View list that better meets your current task.
You can shift from the default mode of having the Model Explorer automatically apply views to a mode in which you must manually select a view to change views.
To enable the manual view selection mode:
Select View > Column View > Manage Views.
The View Manager dialog box opens.
In the View Manager dialog box, click the Options button and clear Change View Automatically.
In the manual view selection mode, if you switch to a different kind of node in the Model Hierarchy pane that has a different view associated with it, the Contents pane displays a yellow informational bar suggesting a view to use.
You can manage views (for example, create a new view or export a view) using the View Manager dialog box. To open the View Manager dialog box, select the Manage Views option from either:
The View > Column View menu
The options listed when you click the Options button in the column view details section
The View Manager dialog box displays a list of defined views and provides tools for you to manage views.
You can manage views in several ways, including creating, deleting, reordering, exporting, importing, and resetting views.
Tip Interface
— Display or hide tips
tip field
The tip interface appears immediately above the table in the Contents pane. It does not appear if, in the View Manager dialog box, you clear Options > Change View Automatically. The tip interface displays a link for changing the current view to a suggested view. To choose the suggested view displayed in the tip bar, click the link. To hide the currently displayed tip, from the menu button on the right side of the tip bar, select Hide This Tip.
Initially, the suggested view is the default view associated with a node. If you associate a different view with a node category, then the tip suggests the most recently selected view when you select similar nodes.
To change from manual specification of views to automatic specification, from the tip interface, select the down arrow and Change View Automatically.
To enable the tip interface, in the View menu, select Column View > Manage Views. In the View Manager, enable Options > Change View Automatically.
Dialog Pane
— Display properties of objects
dialog pane
Use the Dialog pane to view and change properties of objects that you select in the Model Hierarchy pane or in the Contents pane.
By default, the Dialog pane appears to the right of the Contents pane. To show or hide the Dialog pane, use one of these approaches:
From the View menu, select Show Dialog Pane.
From the main toolbar, click the Dialog View button
.
To edit property values using the Dialog pane:
In the Contents pane, select an object (such as a block or signal). The Dialog pane displays the properties of the object you selected.
Change a property (for example, the port number of an Outport block).
Click Apply to accept the change, or click Revert to return to the original value.
By default, clicking outside the Dialog pane when a field has unapplied changes causes the Apply Changes dialog box to appear. Click Apply to accept the changes or Ignore to revert to the original settings.
To prevent the Apply Changes dialog box from displaying:
In the dialog box, click the In the future Apply or Ignore (whichever I select) without asking check box.
If you want Simulink to apply changes without warning you, press Apply. If you want Simulink to ignore changes without warning you, press Ignore.
To restore the Apply Changes dialog box, from the Tools menu, select Prompt if dialog has unapplied changes.
When you select a numeric MATLAB variable or a Simulink.Parameter
object in a model
workspace, the Argument check box appears in the
Dialog pane. This check box configures the variable or object as
a model argument. See Parameterize Instances of a Reusable Referenced Model.