How to Generate Documents with Enterprise Architect – The Basics

Webinar October 2014

Finished your analysis or design model and need to publish it as a document?
Do you need to follow a corporate style or use a document structure defined by your customer?

In this two-part webinar series, you'll learn how to deliver customized documentation using Enterprise Architect's powerful document generator.

This webinar covers the basics. Ben Constable, Senior Analyst at Sparx Systems, teaches you how to:
  • Create a custom cover page and table of contents
  • Define report templates with just the model information you need
  • Generate the document to match a realistic, target sample

Explore the Example Data Model and Document Templates

We have provided the example Enterprise Architect model used in the webinar, along with the associated resources.

Example model: document-generation-basics-example-model.eap Download Enterprise Architect Example Model for ArcGIS Geodatabase Documentation
Document templates: arcgis-data-dictionary-document-templates.xml
Download Enterprise Architect Example Report Templates for ArcGIS Geodatabase Documentation
Generated Document: smart-meter-data-dictionary-report.docx Download ArcGIS Geodatabase Data Dictionary Word Document Generated by Enterprise Architect

Questions from the Audience

Click on a question to see the answer.


Which version of Enterprise Architect were you using?

Enterprise Architect 11, Build 1112.

Are most of the features you demonstrated only available in version 11?

Some of the features were introduced in version 11 – for example, the Report Specification element, Style sheets, Template Selectors and .docx file support. Other aspects of document generation in the presentation were enhanced in version 11 – for example, the cover page and table of contents previously needed to be included in the top-level template, whereas Enterprise Architect 11 provides dedicated templates for them. Most of the template editing features are available in earlier versions of Enterprise Architect.

Can we have the model and the templates used in this presentation?

Yes. We've made the model and templates available for download from this page.

Can you do the same for HTML report generation?

No. The HTML report generator has a limited set of options compared to the document generator and it is not template-driven.

When is the next webinar on this subject scheduled?

We will host a follow-up webinar on document generation in the last week of November. See the registration page for details.

I've seen Word complain that the generated DOCX contains custom tags – are you aware of this issue?

Yes. This known issue was corrected with the release of Enterprise Architect 11, Build 1111.

Is the .doc (Word document) available on version 10?

No. If you don't have Enterprise Architect 11 available, you might consider a third-party add in for Enterprise Architect that is capable of generating Microsoft Word documents. For an example, see the eaDocX product listing.

Can these created documents be exported and imported to other projects?

Yes. You can import a generated document into another model simply by dropping it from the File Explorer onto a Diagram. The templates can also be reused across projects, as explained below.

Template Editing

What fields are available in headers and footers, such as current package or element names?

Any of the Project Constants that you have defined using the Generate Documentation dialog, and any Report Constants from the context menu (Author, Date, Alias Name Source Status, Title, Version, Filename). None of the fields from other sections, however, should be used within the header or footer.

Is there a location on the hard drive where Enterprise Architect stores the template files?

Yes. C:\Program Files (x86)\Sparx Systems\EA\DocTemplates

You can also export report templates to a file. For instructions, see the Help topic Export Reference Data. You need to export the data labelled RTF Document Templates.

How can some of the standalone components like glossary be incorporated in the Document Generator?

Use – for example– the Project (Model) Glossary system-provided template for one of the Model Documents in a Virtual Document. Or design your own template to pull in the information you need, such as the glossary section, in your own templates.

Where did the Document Generator pick up the document version number from?

The Report Constant named ReportVersion. It corresponds to the version of the Package being reported on. For more information, see the Help topic Report Constants.

Where do I find the info to fill in the definitions for the Template Fragments that are called from a Template Selector?

See the video on this page at 16:00 minutes. Also see the Help topic Define a Template Selector.

Can tables be set to auto-resize?

(I have managed to do auto-resizing tables (i.e. cells auto-resizing) in previous versions of Enterprise Architect by pasting a table from Word. But does the tool now support that feature?)

No, an auto-resize option is not yet supported. You should still be able to copy and paste auto-resizing cells from Word into a report template in Enterprise Architect.

Can you repeat how you chose fragments by drag and drop and how they got selected by the template selector fragment?

See the recorded presentation at 18:00 minutes to see how the Template Selector was added to the top-level template. At 16:00 minutes the presentation shows you how to select templates for different kinds of element. Also see the Help topics Define a Template Selector and Adding Fragments to a Document Template.

I looked for documentation for the Template Selector, will that be available soon?

See Enterprise Architect's Help topic Define a Template Selector. (At the time of writing, the video presentation shows an additional capability to select templates by element stereotype, not shown in the help topic.)

What out of the box templates are available and where are they?

You can see the system-provided templates in Enterprise Architect's Resources view. Access the Resources view via the Project menu > Resources. Look for the templates under the folder Document Generation | System Templates.

Are template changes recorded?


What image formats are supported by the template editor?

Bitmap, JPEG, PNG, GIF, TIFF, Windows Meta files and Enhanced Meta files.


How do you get large class diagrams to print on multiple pages?

In the Diagram Properties dialog, select the Diagram tab. Enable the option Divide Diagram into Multiple Pages.

When generating documentation, I have problems with the size of diagram images. Some are OK, some are too small, some are too big and the most unpleasant case is, when the aspect ratio is not kept. Is there any way how to control the diagram size?

Not yet. We are investigating a solution.

Document Structure

Can you link the report specification with Virtual Documents (Master and Model Documents)?

Not yet. We are investigating this feature request.

Could we generate documentation by selecting different elements across packages?

Yes. You can define a Model Search that selects elements from various packages. You can report the results of that search. You can also use Virtual Documents to define a report that uses a particular Model Search and template. See the Help topics on Model Search and Model Documents.

How do you report elements that reside in different packages?

As for the previous question.

Can you report multiple relationship matrices per package?

Yes. All Relationship Matrices on a package will be documented. There is currently no way, however, to select which one(s) to document.

Can you swap between landscape and portrait layout for different document sections?

Yes. In the Template Editor, use the context menu Edit | Edit Section.

Can we generate a document from multiple packages?

Yes. You can use a Model Document to specify multiple packages. You can also combine multiple Model Documents into a single report using a Master Document. The next webinar on Enhanced Document Generation will discuss these features. You might also be interested in the Help topic Virtual Documents.

Cover Page

How do you find the cover page template? I can't see it in the Resources view.

Look under the folder Document Generation | System Templates | Cover Pages. You can copy that template by selecting it and using the context menu.

Table of Contents

How do you change the font in the TOC?

You can edit the styles associated with table of contents entries in a style sheet. See the Help topic Notes on Creating Stylesheets.


How can I set up the report styles to match our company's numbered styles?

See the Help topic Notes on Creating Stylesheets. You might also like to sign up for the next webinar on Enhanced Document Generation.

Is there any 'how-to' available on the Sparx website on how to create your own style sheets?

The next webinar on Enhanced Document Generation will include editing of style sheets.

Can you import an existing word document as template?

No. Internally Enterprise Architect uses specifically named bookmarks for each section, which cannot be reliably imported from Word.

If you just need to copy say a cover page or a particular layout/style from a Word document you could first export it as an RTF (Rich Text Format) document. Then import that RTF document into a blank Enterprise Architect report template.

Register for our Next Webinar!

Register for the next Sparx Systems Webinar