Adding existing elements to a diagram

Existing project elements can be added to a class diagram in a number of ways. On the one hand, several elements can be added simultaneously by importing the whole project structure or a selected folder via a command. On the other hand, an individual element can be added by dragging & dropping it onto the class diagram editor.

Depending on the number of elements, the following action options are available.

Import whole project structure when a new diagram is created

1. Create a new class diagram and activate the option Import project structure into class diagram.
The new class diagram object is added to the project tree. The class diagram editor opens and shows the class diagram for the existing project.

Import whole project structure into an empty diagram

1. Open an empty class diagram, which sits directly at the top project level in the project tree, not in a project folder.
2. Execute the command Import project structure to active class diagram, which is available in the context menu of the class diagram editor.
Adding existing elements to a diagram 1:
The class diagram shows the existing structure of the whole project.

Import whole folder structure into an empty diagram

1. Open an empty class diagram from the folder whose structure you want to import into the class diagram.
2. Execute the command Import project structure to active class diagram, which is available in the context menu of the class diagram editor.
Adding existing elements to a diagram 2:
The class diagram shows the existing structure of the folder containing the class diagram.

Visualize existing element from the project tree on the diagram

1. Select an element of type POU, INTERFACE, GVL or DUT in the project tree and drag & drop it onto the opened class diagram. Drop it in a suitable location to visualize it there.
The corresponding element is shown in the diagram. If relationships with already shown elements exist, these are displayed automatically.

Visualize existing element from the cross-references on the diagram

The class element, which has a relationship with the selected element but is not included in the class diagram, is shown in the Toolbox window under the heading Incoming cross references or Outgoing cross references. First, the relationship type that links the two elements is shown as a symbol. This is followed by the name of the target or source element. You can drag and drop the element onto the diagram, so that the element is shown in the class diagram.

Adding existing elements to a diagram 3:

Showing cross-references

1. Open the Toolbox window via the View menu.
2. Select a rectangle element in the opened class diagram, which has relationships that are not shown in the class diagram.
Under Toolbox the relationships with the elements are listed, which are not yet shown in the class diagram. Under Incoming cross references missing incoming relationships with source elements are listed. Under Outgoing cross references missing outgoing relationships are listed, together with target elements.

Visualize existing element from the cross-references on the diagram

1. Drag & drop the element, which is listed under Incoming cross references or Outgoing cross references and which is to be shown in the diagram, onto the class diagram. Drop it in a suitable location to visualize it there.
The corresponding element is shown in the diagram. The relationships with the already shown elements are displayed automatically.