Topics
Prev Next

Add Diagram Links To Diagrams

Whilst a diagram usually represents a structure of modeling objects, it can also act as a portal through which you can access related diagrams that provide more detail on an aspect, or alternative views of the structure, or other structures. Where there are many diagrams (or, indeed, other objects and features) to move on to, the initial diagram can become a home page for a part of the project, or even the entire project.

Several options for linking to another diagram are provided by the 'Select Type' dialog, which displays when you drag the target diagram from the Project Browser onto the host diagram.

Drop Diagram Options

Select the appropriate option to set up the required type of link to the target diagram, and then click on the OK button.

Option

Description

See also

Diagram Frame

This option creates a Diagram Frame element containing an image of the dropped diagram, with the name of the dropped diagram in the frame label. Any user looking at the host diagram can double-click on the Diagram Frame and open the target diagram for review and - if they have the access permissions - for edit.

Diagram Frame

Diagram Reference

This option creates an empty Diagram Frame element with the name of the dropped diagram in the frame label. Any user looking at the host diagram can double-click on the Diagram Frame and open the target diagram for review and - if they have the access permissions - for edit.

Diagram Frame

Hyperlink

This option adds a Hyperlink element to the diagram, containing a diagram icon with no frame, followed by the names of the parent Package and target diagram. Double-clicking on this hyperlink will open the target diagram.

You can edit the hyperlink to point to another diagram, or to not display the diagram icon, by right-clicking on the element and selecting the 'Properties' option.

You can also create an identical Hyperlink element by dragging the Hyperlink icon onto the host diagram from the 'Common' Toolbox page, right-clicking on the element and selecting 'Properties', and then selecting 'Diagram' from the 'Type' drop-down list.

Hyperlink

Navigation Cell

This option creates a Navigation Cell (a UMLDiagram element) that contains the name of the target diagram and, in the top right corner, an icon representing the diagram type. Just after you click on the OK button, the 'Select Image' dialog displays, from which you can select a graphic that represents the nature of the diagram. You can also select a diagram Theme for the image, from the 'Image List' field. If you do not want to add an image to the element, click on the Cancel button.

If you are using an image, it displays in the center of the element with the target diagram name at the top. If you are not using an image, the name displays in the center of the element.

If you subsequently decide to change or remove the image in a Navigation Cell, right-click on the element and select the 'Appearance > Select Navigation Image' option. The 'Select Image' dialog displays, and you can simply click on a different image or - to just remove the existing image - click on the Cancel button.

Selecting the 'Navigation Cell' option also enables the 'Run auto layout' checkbox, which you can select to automatically adjust the layout of the Navigation Cells to form a grid with 10 units of separation between cells. (The unit is defined in the diagram Properties). If you do not want to adjust the layout of the cells, clear the checkbox before clicking on the OK button.

When a diagram user double-clicks on the Navigation Cell, the target diagram that it represents is opened and displayed.

Navigation Cells are an excellent tool for creating a 'Home' page for a project or website, as illustrated by the default model diagram for the Sparx Systems Example Model.

If you use Navigation Cells in a model, they add the stereotype <<NavigationCell>> and its associated ShapeScript to the model. Users opening the model in builds of Enterprise Architect earlier than 13.5 can then use this stereotype to create more Navigation Cells that are functionally the same as the Cells under Release 13.5, though a little more rudimentary.

List

This option creates a Model View chart that lists the elements within the target diagram. When you select the option and click on the OK button, the Model View element 'Properties' dialog displays at the 'Chart Details > Source' page, showing the SQL statement that populates the list. Click on the OK button to execute the search and generate the List of Elements Chart.

Define a Model View Chart

Other Links to Diagrams from Diagrams

There are additional ways to link to and access one diagram from another. These include:

  • From the Project Browser, drag a Package containing the target diagram (as the first diagram listed in the Package) onto the host diagram, and select the 'As Element' option; when a user double-clicks on the Package element on the host diagram, the target diagram displays
  • Right-click on a suitable element in the host diagram and select the 'New Child Diagram | Composite Structure Diagram' option, then double-click on the element to display the first diagram underneath the element; if that is not the required diagram, right-click on the element and select the 'New Child Diagram | Select Composite Diagram' option, then choose the target diagram from the 'Select a Diagram' dialog
         -  You can display the target Composite diagram instead of the parent element on the host diagram; right-click and
            select the 'New Child Diagram | Show Composite Diagram in Frame' option
         -  Alternatively, you can display the target diagram in a compartment within the parent element outline; right click and
            select the 'New Child Diagram | Show Composite Diagram in Compartment' option

Learn more