Stateflow    
State Properties

Stateflow API objects of type State have the properties listed in the table below. See also State Methods.

Property
Type
Acc
Description
ArrowSize
Double
RW
Size of transition arrows coming into this state (default = 8). Equivalent to selecting Arrowhead Size from the context menu for this state.
BadIntersection
Boolean
RO
If true, this state graphically intersects a box, graphical function, or other state.
Chart
Chart
RO
Chart object containing this state.
Debug.
Breakpoints.
onDuring
Boolean
RW
If set to true (default = false), set the state entry breakpoint for this chart. Equivalent to selecting the State During check box in the properties dialog for this state.
Debug.
Breakpoints.
OnEntry
Boolean
RW
If set to true (default = false), set the state entry breakpoint for this chart. Equivalent to selecting the State Entry check box in the properties dialog for this state.
Debug.
Breakpoints.
onExit
Boolean
RW
If set to true (default = false), set the state entry breakpoint for this chart. Equivalent to selecting the State Exit check box in the properties dialog for this state.
Decomposition
Enum
RW
Set this property to 'EXCLUSIVE_OR' (default) to specify exclusive (OR) decomposition for the states at the first level of containment in this state.
Set to 'PARALLEL_AND' to specify parallel (AND) decomposition for these states. Equivalent to the Decomposition selection in the context menu for the state.
Description
String
RW
Description of this state (default = ''). Equivalent to entering a description in the Description field of the properties dialog for this state.
Document
String
RW
Document link to this state (default = ''). Equivalent to entering the Document Link field of the properties dialog for this state.
FontSize
Double
RW
Size of the font (default = 12) for the label text for this state. This property overrides the default size for this state, which is set by the StateFont.Size property of the Chart object containing this state. Equivalent to selecting Font Size > <font size> in the context menu for this state.
Id
Integer
RO
Unique identifier assigned to this state to distinguish it from other objects loaded in memory.
IsGrouped
Boolean
RW
If set to true (default = false), group this state.
Nothing is allowed to change inside a grouped state.
This property is also useful for copying states to a new location. See Copying by Grouping (Recommended).
IsSubchart
Boolean
RW
If set to true (default = false), make this state a subchart.
LabelString
String
RW
Label for this state (default = '?'). Equivalent to typing the label for this state in its label text field in the diagram editor.
Machine
Machine
RO
Machine containing this state.
Name
String
RW
Name of this state (default = ''). Equivalent to typing this state's name into the beginning of the label text field for this state in the diagram editor. Name is separated from the remainder of this state's label text by a forward slash (/) character.
Position
Rect
RW
Position and size of this state's box in the Stateflow chart, given in the form of a 1-by-4 array (default is [0 0 90 60]) consisting of the following:
  • (x,y) coordinates for the box's left upper vertex relative to the upper left vertex of the Stateflow diagram editor workspace
  • Width and height of the box
Subviewer
Chart or State
RO
State or chart in which this state can be graphically viewed.
Tag
Any Type
RW
Holds data of any type (default = []) for this state.
Type
Enum
RO
Type of this state (default = 'OR'). Can be 'OR' (exclusive) or 'AND' (parallel). The type of this state is determined by the parent's Decomposition property.


  Chart Properties Box Properties