Report Elements From External Packages

Elements can be re-used in different diagrams across a model, which can often mean that a diagram contains 'external' elements from packages other than the diagram's parent package. Using the Document Template Designer, you can create custom templates to generate reports showing all elements used in a package with 'internal' and 'external' elements grouped separately, or only the elements actually held within a package. You can also select options to expose the external elements from all diagrams in a package, or only from selected diagrams in the package.

The separation of 'external' and 'internal' elements avoids duplication of information and identifies the elements that impact the package but are not part of the package structure. Normally, you would report the same level of detail for each internal and external element, but you can also define a smaller group of details for the external elements, including the name of the parent package.

Access     Tools | Document Template Designer > Sections

Add sections to include elements in diagrams

Step

Action

See also

1

In the Sections panel on the left-hand side of the editor window, select the Package > Element checkbox.

Selecting the checkbox adds the following set of sections to the Content panel of the template:

 

PkgElem

 

Setting Sections for Reporting

2

Delete the two [right-click-to...] texts and after the:

package > section marker, type Package Name: then right-click and select the Insert Field | Name option
element > section marker, type Element Name: then right-click and select the Insert Field | Name option

 

The template now resembles the following illustration:

 

PkgElem2

 

Add Section Content

3

In the Sections panel, select the Package > Diagram > Element checkbox.

Selecting the checkbox extends the set of sections in the Content panel of the template:

 

pkgdiagelem

 

 

4

Delete the two [right-click-to...] texts and after the:

diagram > section marker type Diagram: then right-click and select the Insert Field | Name option

 

Delete the space between the element > section markers. The template now resembles the following illustration:

 

pkgdiagelem2

 

Because the Diagram > Element section does not contain any fields, the type of content of this section in the generated report is determined by the Package > Element section.

 

 

 

Specify diagrams & generate report

Step

Action

See also

1

Select the appropriate option:

In the Diagram Properties dialog for selected diagrams, the Document each contained element in RTF checkbox, to identify all the elements in those diagrams in your report, or
On the Generate RTF Documentation dialog, the Include all diagram elements in report checkbox  to include all elements in each and every diagram covered by the report

 

 

Diagram Options

Generate Documentation

2

In the Project Browser, select the package to report on, and execute the report through either:

The Document Template Designer, or
The Generate Documentation Dialog
 

Design Custom Document Templates

Generate Documentation

 

3

The generated report for this example resembles the following output:

 

extelemout

 

The report shows that the BlockFrame package contains 8 elements, but has links to three elements from other packages because those three elements have been used in the BlockFrame diagram.

 

 

Notes

The illustrations in this description show the very simplest set-up, to achieve the result of identifying external elements in a report; you can, if you wish, populate the report with other sections and fields, leaving the Diagram > Element section empty to duplicate the structure of the Package > Element section
If you do add fields to the Diagram > Element section, the section will have its own structure and format and can provide different element details; for example, selecting the Insert Field |  Name (Full) menu option adds the {Element.FullName} field, which identifies each external element's parent package
If you insert the Package > Diagram > Element section but not the Package > Element section, the subsequent report will show just the elements used in each diagram, without distinguishing between external and internal elements
If you insert the Package > Element section but not the Package > Diagram > Element section, the subsequent report will show just the elements held in the package
 

Learning Center topics

Alt+F1 | Enterprise Architect | Reporting | RTF Templates | Reporting Elements from External Packages