Preface

Enterprise Architect is a powerful and versatile modeling tool that supports a wide range of diagrams, such as UML, BPMN, SysML, ArchiMate, and more. One of the features that makes Enterprise Architect so flexible and productive is the ability to copy diagrams between different packages, projects, or models. This can save you time and effort when you need to reuse or modify existing diagrams for different purposes.

However, copying diagrams in Enterprise Architect is not as simple as copying and pasting. There are different options and implications that you need to be aware of before you copy a diagram. In this blog post, we will explain the three main options for copying diagrams in Enterprise Architect: Shallow, Deep, and Smart Copy. We will also discuss the advantages and disadvantages of each option, and provide some tips and best practices for copying diagrams effectively.

Shallow Copy

Shallow Copy is the simplest and most straightforward option for copying diagrams in Enterprise Architect. It creates a duplicate diagram with links back to the original diagram elements, unless those elements are Text, Note, Hyperlink, Lifeline, or Object elements that are specific to the diagram and that are copied as new elements1.

To perform a Shallow Copy, you need to follow these steps:

  • In the Project Browser window, select the diagram to copy.
  • Right-click to display the context menu and select the Copy Diagram to Clipboard menu option.
  • Navigate to the package to host the new diagram, and right-click to open the context menu.
  • Select the Paste Diagram menu option.

The new diagram is automatically created with linked or new elements arranged as in the original diagram. All connectors are also copied between diagram elements where appropriate1.

The advantage of Shallow Copy is that it preserves the consistency and integrity of the original elements. Any changes to the properties of the original elements are reflected in the linked elements in the pasted diagram. This can be useful when you want to show the same elements in different contexts or perspectives, or when you want to create a variation of a diagram without affecting the original one.

The disadvantage of Shallow Copy is that it does not create independent copies of the original elements. This means that you cannot modify the linked elements in the pasted diagram without affecting the original elements. This can be problematic when you want to make changes to the pasted diagram that are specific to that diagram, or when you want to delete or move the original elements without breaking the links.

Deep Copy

Deep Copy is the opposite of Shallow Copy. It creates a complete copy of all elements in the diagram, other than Packages, which are copied as simple links only1. This means that the pasted diagram has its own set of elements that are independent from the original elements.

To perform a Deep Copy, you need to follow these steps:

  • In the Project Browser window, select the diagram to copy.
  • Right-click to display the context menu and select the Copy Diagram to Clipboard menu option.
  • Navigate to the package to host the new diagram, and right-click to open the context menu.
  • Select the Paste Diagram menu option.
  • In the Name field, type the name for the new diagram.
  • In the Type of copy field, select the Deep radio button.
  • Click on the OK button.

The new diagram is automatically created with new elements arranged as in the original diagram. All connectors are also copied between diagram elements where appropriate1.

The advantage of Deep Copy is that it creates independent copies of the original elements. This means that you can modify the new elements in the pasted diagram without affecting the original elements. This can be useful when you want to create a new diagram that is based on an existing one, but has different properties, values, or behaviors.

The disadvantage of Deep Copy is that it does not preserve the consistency and integrity of the original elements. Any changes to the properties of the original elements are not reflected in the new elements in the pasted diagram. This can be problematic when you want to keep the original and the new diagrams in sync, or when you want to avoid duplication or inconsistency of elements in your model.

Smart Copy

Smart Copy is a hybrid option that combines the best of both Shallow and Deep Copy. It creates a complete copy of all elements in the diagram that have the same parent as the diagram, and links back to the original diagram elements for all other elements on the diagram1. This means that the pasted diagram has its own set of elements for the elements that belong to the same package as the diagram, and linked elements for the elements that belong to other packages.

To perform a Smart Copy, you need to follow these steps:

  • In the Project Browser window, select the diagram to copy.
  • Right-click to display the context menu and select the Copy Diagram to Clipboard menu option.
  • Navigate to the package to host the new diagram, and right-click to open the context menu.
  • Select the Paste Diagram menu option.
  • In the Name field, type the name for the new diagram.
  • In the Type of copy field, select the Smart radio button.
  • Click on the OK button.

The new diagram is automatically created with new or linked elements arranged as in the original diagram. All connectors are also copied between diagram elements where appropriate1.

The advantage of Smart Copy is that it creates independent copies of the original elements that belong to the same package as the diagram, and preserves the consistency and integrity of the original elements that belong to other packages. This can be useful when you want to create a new diagram that is based on an existing one, but has different properties, values, or behaviors for the elements that are specific to that diagram, and keep the same properties, values, or behaviors for the elements that are shared across different diagrams.

The disadvantage of Smart Copy is that it can be confusing or complex to manage the new or linked elements in the pasted diagram. You need to be careful when you modify the new or linked elements in the pasted diagram, as they may affect the original elements or other diagrams that use them. You also need to be aware of the parent-child relationships of the elements in the pasted diagram, as they may differ from the original diagram.

Summary

In summary, copying diagrams in Enterprise Architect is a feature that can help you reuse or modify existing diagrams for different purposes. However, you need to be aware of the different options and implications that come with copying diagrams. Here is a table that summarizes the advantages and disadvantages of each option:

OptionAdvantageDisadvantage
Shallow CopyPreserves the consistency and integrity of the original elementsDoes not create independent copies of the original elements
Deep CopyCreates independent copies of the original elementsDoes not preserve the consistency and integrity of the original elements
Smart CopyCombines the best of both Shallow and Deep CopyCan be confusing or complex to manage the new or linked elements

We hope that this blog post has helped you understand how to copy diagrams in Enterprise Architect, and how to choose the best option for your needs. If you have any questions or feedback, please feel free to contact us. Thank you for reading. 😊


How to Copy Diagrams in Enterprise Architect

Johannes Rest


.NET Architekt und Entwickler


Beitragsnavigation


Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert