Stateflow | ![]() ![]() |
Getting a Handle on Stateflow API Objects
You manipulate Stateflow objects by manipulating the Stateflow API objects that represent them. You manipulate Stateflow API objects through a MATLAB variable called a handle.
The first handle that you require in the Stateflow API is a handle to the Root object, the parent object of all objects in the Stateflow API. You receive a handle to the Root object through a command like the following:
The handle rt
now represents the Stateflow Root object. You can use rt
to find a handle to the Machine object corresponding to the Simulink model you want to work with. Once you have a handle to a machine object, you can find a handle to a Chart object for the chart you want to edit. Later on, when you create objects or find existing objects in a Stateflow chart, you receive a handle to the object that allows you to manipulate the actual object in Stateflow.
You are introduced to obtaining handles to Stateflow API objects and using them to create and alter Stateflow diagrams in Quick Start for the Stateflow API.
![]() | Stateflow API Object Hierarchy | Using API Object Properties and Methods | ![]() |