Topics
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 Project Browser, 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 Project Browser, 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 Project Browser, 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.

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 Project Browser, or
  • Double-clicking on it and editing the name in the 'Properties' dialog

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 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