Copy a Package
Enterprise Architect enables you to quickly duplicate a complete package, including its child packages, elements and diagrams.
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.
To copy a package, follow the step below:
- 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.
To paste a package, follow the step below:
- 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 - Copy 2, - 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.