Main Content

Stateflow.SymbolReference

R2026b

Reference to symbol name

Since R2023a

    Description

    Stateflow.SymbolReference objects indicate where a Stateflow® chart refers to a symbol name. For example, a Stateflow.SymbolReference object can correspond to a state or transition action that includes a symbol name. Symbols include Stateflow.Data, Stateflow.Event, Stateflow.Message, and other Stateflow objects that have a Name property.

    Creation

    The Stateflow chart maintains an array of Stateflow.SymbolReference objects for each symbol. To access this array, call the object function getReferences.

    Properties

    expand all

    Stateflow API objects have properties that correspond to the values you set in the Stateflow Editor. To access or modify a property, use dot notation. To access or modify multiple properties for multiple API objects, use the get and set functions, respectively. For more information, see Modify Properties and Call Functions of Stateflow Objects.

    This property is read-only.

    Object that references the symbol name, specified as a Stateflow API object of one of these types:

    This property is read-only.

    Position of the symbol name, specified as a two-element integer vector of the form [start end] or as an empty vector.

    • If WhereUsed is a Stateflow.State or Stateflow.Transition object, the values of start and end indicate the positions of the first and last characters of the symbol name in the LabelString property of WhereUsed.

    • If WhereUsed is a Stateflow.EMFunction object, the values of start and end indicate the positions of the first and last characters of the symbol name in the Script property of WhereUsed.

    • If WhereUsed is an object of any other type, this property is an empty vector.

    Examples

    Version History

    Introduced in R2023a