Copy a Package

Enterprise Architect enables you to quickly duplicate a complete package, including its child packages, elements and diagrams.

Topics

Topic

Detail

See also

Inserting a copy of a package

You can insert the copy of a package:

Under the same parent
Under one or more other packages in the same model or project, or
Under one or more other packages in any other model or project

 

This procedure is effectively the same as exporting and importing the package XMI file, with the Strip GUIDs checkbox selected.

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.

 

Package XMI files

Copying a package

In the Project Browser, right-click on the required package and select the Copy Package to Clipboard context menu option (or click on the package and press ( Ctrl+C )).

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

 

 

Pasting a package

In the Project Browser, right-click on the package into which to paste the copied package, and select the 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.

The target package is expanded to expose the pasted package in the Project Browser; 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 either by clicking twice on it and editing the name in the Project Browser, or by double-clicking on it and editing the name in the Properties dialog.

 

 

Notes

A copy of a package does not have the external cross references of the source package; that is, the following connectors are discarded:
Connectors coming from packages and elements outside the package being copied, into the package being copied
Connectors going to packages and elements outside the package being copied, from the package being copied
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

Learn more