To move a graphical object programmatically, choose one of these techniques:
In each 1-by-4 array, the first two values are the (x,y) coordinates of the upper left corner of the object. The last two values are the width and height, respectively.
These programmatic techniques work only for objects that have
You can adjust the location of a subcharted state as follows:
Get a handle to the root object.
rt = slroot;
Get a handle to the subcharted state
the Elevator System chart.
em = rt.find('-isa','Stateflow.State','Name','Elevator_Manager');
Change the chart position of
em.set('Position', [20 250 200 60]);
The following changes occur:
Elevator_Manager subchart moves
to the location (20,250) from the upper left corner of the chart.
The subchart now has a width of 200 and a height of 60.
You cannot change the position of a subchart boundary in the subviewer programmatically.
For objects in a subcharted state, box, or graphical
function, you cannot use the
set method to move
these objects between different levels of the chart hierarchy. See Copy Objects for directions on copying
and pasting objects from one container object to another.