Main Content

Rules for Naming Stateflow Objects

You can name Stateflow® objects with any combination of alphanumeric and underscore characters. Names cannot begin with a numeric character or contain embedded spaces.

Restriction on Name Length

Name length should comply with the maximum identifier length enforced by Simulink® Coder™ software. You can set the Maximum identifier length parameter. The default is 31 characters and the maximum length you can specify is 256 characters.

Keywords to Avoid When Naming Stateflow Objects

Avoid using reserved keywords to name Stateflow objects. These keywords are part of the action language syntax.


Do not use the file names sf.sfx for Stateflow charts or sf.slx for Simulink models. Using these file names can shadow Stateflow program files and result in unpredictable behavior.

Related Topics