Stateflow User's Guide Previous page   Next Page

Moving and Copying Data, Events, and Targets in the Model Explorer

You can move data, event, or target objects to another parent by doing the following:

  1. Select the data, event, or target to move in the Contents pane of the Explorer.
  1. You can select a contiguous block of items by highlighting the first (or last) item in the block and then using Shift+click for highlighting the last (or first) item.

  1. Click and drag the highlighted objects from the Contents pane to a new location in the Model Hierarchy pane to change its parent.
  1. A shadow copy of the selected objects accompanies the mouse cursor during dragging. If no parent is chosen or the parent chosen is the current parent, the mouse cursor changes to an X enclosed in a circle, indicating an invalid choice.

You can accomplish the same outcome by cutting or copying the selected events, data, and targets as follows:

  1. Select the event, data, and targets to move in the Contents pane of the Explorer.
  2. From the Edit menu of the Explorer, select Edit -> Cut or Copy.
  1. If you select Cut, the selected items are deleted and are copied to the clipboard for copying elsewhere. If you select Copy, the selected items are left unchanged.

    You can also right-click a single selection and select Cut or Copy from the resulting menu. Explorer also uses the keyboard equivalents of Ctrl+X (Cut) and Ctrl+C (Copy).

  1. Select a new parent machine, chart, or state in the Model Hierarchy pane of the Model Explorer.
  2. From the Edit menu of the Explorer, select Edit -> Paste. The cut items appear in the Contents pane of the Explorer.
  1. You can also paste the cut items by right-clicking an empty part of the Contents pane of the Explorer and selecting Paste from the resulting menu. Explorer also uses the keyboard equivalents of Ctrl+V (Paste).


Previous page  Setting Properties for Stateflow Objects in the Model Explorer Changing the Port Order of Input and Output Data and Events Next page

© 1994-2005 The MathWorks, Inc.