Stateflow | ![]() ![]() |
Using API Object Properties and Methods
Once you obtain handles to Stateflow API objects, you can manipulate the Stateflow objects that they represent through the properties and methods that each Stateflow API object possesses. You access the properties and methods of an object through a handle to the object.
API properties correspond to values that you normally set for an object through the user interface of the Stateflow diagram editor. For example, you can change the position of a transition by changing the Position property of the Transition object that represents the transition. In the Stateflow diagram editor you can click-drag the source, end, or midpoint of a transition to change its position.
API methods are similar to functions for creating, finding, changing, or deleting the objects they belong to. They provide services that are normally provided by the Stateflow diagram editor. For example, you can delete a transition in the Stateflow diagram editor by calling the delete
method of the Transition object that represents the transition. Deleting a transition in the diagram editor is normally done by selecting a transition and pressing the Delete key.
Stateflow API objects have some common properties and methods. For example, all API objects have an Id
and a Description
property. All API objects have a get
and a set
method for viewing or changing the properties of an object, respectively. Most API objects also have a delete
method. Methods held in common among all Stateflow objects are listed in the reference section All Object Methods.
Each API object also has properties and methods unique to its type. For example, a State object has a Position
property containing the spatial coordinates for the state it represents in the chart editor. A Data object, however, has no Position
property.
API References to Properties and Methods
When you need to know what property's value to change or what method to call to effect a change in a Stateflow chart, you can consult the following references for specific information about an individual Stateflow API property or method:
![]() | Getting a Handle on Stateflow API Objects | Quick Start for the Stateflow API | ![]() |