| Stateflow® | ![]() |
| On this page… |
|---|
When you simulate a model, build a target, or generate code for a target, you automatically parse the Stateflow® machine (see Parsing Stateflow® Charts). During that time, if your chart does not resolve some of its symbols, the following process determines whether to report parse errors for the unresolved symbols or to continue generating code.

For information about Simulink® symbol resolution, see Resolving Symbols and Hierarchical Symbol Resolution in the Simulink documentation.
You can use the Symbol Autocreation Wizard to add missing data and events to your Stateflow charts. When you parse or simulate a chart, the Wizard detects references to undefined data and events and presents a list of the recommended data or events that you must define.

To accept, reject, or change a recommended item, do one of these steps:
To accept an item, click on the space in front of the item under the check mark column.
To accept all items, click CheckAll.
To reject an item, leave it unchecked.
To change an item, click on the icon under the T (type) column, or click on the string under the Scope or Proposed Parent column for that item.
Each time you click on an icon or a string, the Wizard replaces the entry with a different one. Keep clicking until the desired icon or string appears.
| Column in the Wizard | Choices When You Toggle Between Entries |
|---|---|
| T | Data, Event |
| Scope | Local, Input, Output |
| Proposed Parent | Chart, Machine |
After you finish editing the symbol definitions, click Create to add the symbols to the Stateflow hierarchy.
![]() | Parsing Stateflow® Charts | Error Messages When Parsing Charts and Generating Code | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |