When copying or cutting elements for pasting, a clear distinction has to be made between model elements and view elements. If a model element is copied, it has to be pasted under a model element. In this case, all the sub-elements contained in the selected element are copied together. View elements can be copied within the same diagram or to different diagrams. Copied view elements can be pasted in diagrams only; they cannot be pasted to model elements. Copying and pasting may also be restricted depending on the view element types and diagram types.
Procedure for Copying and Pasting Model Elements:
1. | Select a model element to copy from the model explorer. |
2. | Right-click and select the [Copy] menu. The model element is copied to the clipboard. |
3. | Select from the model explorer a model element where the copied element will be pasted. |
4. | Right-click and select the [Paste] menu. The copied model element will be recalled from the clipboard and pasted under the selected element. |
Copied model elements can be pasted only to the elements that can contain them.
Procedure for Copying and Pasting View Elements in Diagram:
1. | Select from the diagram area the view elements to copy. (You may select multiple elements by dragging the mouse over an area. Click the view elements while holding down the [Shift] key to add the elements to the selection.) |
2. | Right-click and select the [Copy] menu. The view elements are copied to the clipboard. |
3. | Open the diagram where the copied view elements will be pasted. (Double-click a view element from the model explorer or the diagram explorer, or select a view element from the diagram tab.) |
4. | Right-click and select the [Paste] menu. The copied view elements will be pasted to the active diagram. |
Copy/Paste for Different Diagram Types
Diagram Type
|
Copy/Paste
|
Class Diagram
|
Elements can be copied or pasted freely between Class, UseCase, Component, CompositeStructure, and Deployment diagrams.
|
UseCase Diagram
|
Elements can be copied or pasted freely between Class, UseCase, Component, CompositeStructure, and Deployment diagrams.
|
Sequence Diagrams
|
Elements cannot be copied or pasted
|
Collaboration Diagrams
|
Elements cannot be copied or pasted
|
Statechart Diagram
|
Elements can be copied or pasted only between diagrams within the same StateMachine
|
Activity Diagram
|
Elements can be copied or pasted only between diagrams within the same ActivityGraph
|
Component Diagram
|
Elements can be copied or pasted freely between Class, UseCase, Component, CompositeStructure, and Deployment diagrams
|
Deployment Diagram
|
Elements can be copied or pasted freely between Class, UseCase, Component, CompositeStructure, and Deployment diagrams.
|
CompositeStructure Diagram
|
Elements can be copied or pasted freely between Class, UseCase, Component, CompositeStructure and Deployment diagrams.
|
|