| Stateflow User's Guide | ![]() |
Viewing Stateflow Objects in the Model Explorer
Depending on what you are editing in Stateflow, you can use one of the following methods for opening Model Explorer:
The Model Explorer window appears similar to the following:
The Explorer main window has two panes: a Model Hierarchy pane on the left and a Contents pane on the right. When you open the Model Explorer, the object you are editing in Stateflow (chart, truth table, or Embedded MATLAB function) is highlighted in the Model Hierarchy pane and its objects are displayed in the Contents pane. In the preceding example, the Model Explorer was opened from the truth table editor for the truth table tt_func in the Stateflow chart myChart.
The Model Hierarchy pane displays the elements of all loaded Simulink models, which includes Stateflow charts, and their states, boxes, and functions. A preceding plus (+) character for an object indicates that you can expand the display of its child objects by double-clicking the entry or by clicking the plus (+). A preceding minus (-) character for an object indicates that it has no child objects.
Clicking an entry in the Model Hierarchy pane selects that entry and displays its child objects in the Contents pane. For convenience, a hypertext link to the currently selected object in the Model Hierarchy pane is included following the Contents of: label at the top of the Contents pane. Click this link to display that object in its native editor. In the preceding example, selecting the link
displays the truth table tt_func in the truth table editor.
By default, the Model Explorer displays event and data child objects in the Contents pane for the selected object in the Model Hierarchy pane. To display additional or different child Stateflow objects in the Contents pane, do the following:
Each type of object, whether in the Object Hierarchy or Contents pane, is displayed with an adjacent icon. Objects that are subcharted (states, boxes, and graphical functions) have their appearance altered by shading.
The display of child objects in the Contents pane includes properties for each object, most of which are directly editable. You can also access the properties dialog for an object from the Model Explorer. See Setting Properties for Stateflow Objects in the Model Explorer for more details.
| Using the Model Explorer with Stateflow Objects | Editing States or Charts in the Model Explorer | ![]() |
© 1994-2005 The MathWorks, Inc.