Book a Demo

Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Prev Next

Copy a Package

In developing your model, you might want to duplicate the structure and organization of a section so that, for example, you can replicate that part of the model in another model, or make it easier to cross-refer the contents of duplicate sections. You can quickly do this by copying a complete Package, including its child Packages, elements and diagrams, and then pasting it under:

  • The same parent Package
  • One or more other Packages in the same model or project, or
  • One or more other Packages in another model or project

You would tend to use this procedure for copying sections of a model within the project rather than reproducing an entire model or project, although copying these larger structures is equally feasible.

Duplicate a Package

Action

Detail

See also

Copy the Package

In the Browser window, right-click on the Package and select the 'Copy / Paste | Copy to Clipboard | Full Structure for Duplication' option (or click on the Package and press Ctrl+Shift+C).

The 'Copy selected Package to Clipboard' dialog briefly displays until the copy operation completes.

Paste the Package

In the Browser window, right-click on the target Package into which to paste the copied Package, and select the 'Copy / Paste | Paste Package from Clipboard' context menu option (or click on the Package and press Ctrl+V).

The 'Paste Package from Clipboard' dialog briefly displays until the paste operation completes.

In the Browser window, the target Package is expanded to show the pasted Package; if you are pasting the Package within the same model as the copied source, the source parent Package is also collapsed. Note that any Version Control settings on the initial Package are removed from the pasted version.

If the target Package already contains:

  • A Package with the same name as the pasted Package, the pasted Package name has the suffix - Copy
  • A Package with the same name as the pasted Package including the - Copy suffix, the suffix becomes - Copy1 (or - Copy2, - Copy3 and so on, as copies of the Package accumulate in the target parent Package)

You can keep the same Package name as the source, or you can rename the Package by either:

  • Clicking twice on it and editing the name in the Browser window, or
  • Double-clicking on it and editing the name in the 'Properties' dialog
Copy and Paste Packages Between Projects Using the Ribbon
This video demonstrates how to quickly copy Packages between modeling projects using the Ribbon and Browser window.
Copy and Paste Packages Between Projects Using the Clipboard
This video demonstrates how to quickly copy Packages between modeling projects using the system clipboard and Browser window.

Notes

  • You cannot paste a Package into a parent Package that is locked by another user or that is checked in; the 'Paste...' option is grayed out in the context menu
  • This procedure is effectively the same as exporting and importing the Package Native/XMI file, with the 'Strip GUIDs' checkbox selected
  • The paste operation can be a single transaction or a series of transactions to paste each data item separately, depending on the setting of the 'Import using single transaction' checkbox in the 'XML Specifications' page of the 'Preferences' dialog
  • You can also move a Package to a different part of the model, in the same way as moving an element

Learn more