Stateflow |
 |
copy Method Limitations
The copy
method is subject to the following limitations for all objects:
- The objects copied must be either all graphical (states, boxes, functions, transitions, junctions) or all nongraphical (data, events, targets).
- You cannot copy a mixture of graphical and nongraphical objects to the Clipboard in the same copy operation.
- To maintain the transition connections and containment relationships between copied objects, you must copy the entire array of related objects.
- All related objects must be part of the array of objects copied to the Clipboard. For example, if you attempt to copy two states connected by a transition to another container, you can only accomplish this by copying both the states and the transition at the same time. That is, you must do a single copy of a single array containing both the states and the transition that connects them.
If you copy a grouped state to the Clipboard, not only are all the objects contained in the state copied, but all the relations among the objects in the grouped state are copied as well. Thus, copying by grouping is a recommended procedure. See Copying by Grouping (Recommended).
Copying Graphical Objects
The copy
method is subject to the following limitations for all graphical objects:
- Copying graphical objects also copies the Data, Event, and Target objects that the graphical objects contain.
- If all copied objects are graphical, they must all be seen in the same subviewer.
- This means that all graphical objects copied in a single copy command must reside in the same chart or subchart.
| Accessing the Clipboard Object | | Copying by Grouping (Recommended) |  |