Stateflow |
 |
Adding Data to the Data Dictionary
You can use either the Stateflow editor or Explorer to add data that is accessible only in a specific chart. You must use the Stateflow Explorer to add data that is accessible everywhere in a Stateflow chart or in a specific object such as a state.
Using the Stateflow Editor to Add Data
To use the Stateflow editor to add data, do the following:
- From the Add menu of the Stateflow editor, select Data.
- On the resulting submenu, select the data's scope (see Scope).
- Stateflow adds a default definition of the new item to the Stateflow data dictionary and displays a Data dialog that displays the new item's default properties.
- Use the Data dialog box to set the new item's properties to reflect its intended usage (see Setting Data Properties).
Using the Explorer to Add Data
To use the Stateflow Explorer to define a data item:
- Select Explore from the Stateflow editor's Tools menu.
- Stateflow opens the Explorer.

- Select the object (machine, chart, or state) in the Explorer's object hierarchy pane where you want the new item to be accessible.
- Select Data from the Explorer's Add menu.
- Stateflow adds a default definition for the new item in the data dictionary and displays an entry for the item in the Explorer's content pane.

- Set the new item's properties to values that reflect its intended usage (see Setting Event Properties).
| Defining Data | | Setting Data Properties |  |