This post is about RepoDoc document generator.

RepoDoc is a powerful document generator for Sparx Systems Enterprise Architect able to produce a variety of document formats using templates written in any text editor. It follows the same principles as the default document generator included in Enterprise Architect by taking:

  • Starting point in the repository determining the part of your model you wish to document i.e. a root package.
  • Document template that tells RepoDoc what to take out from the repository and where to put it into a document.

RepoDoc works with plain text templates and allows you to generate your own customized HTML, LaTeX, Markdown or AsciiDoc documents, but also CSV, XML or JSON files, GraphViz graphs, SVG diagrams and even source codes in different languages. With RepoDoc you can also generate PDF documents easily using the built in post-processing feature.

Using a plain text template has several advantages:

  • Templates may be edited in any text editor,
  • Changes in the templates can be easily tracked and you can put them in a version control system,
  • Templates can be managed centrally by storing them on a shared filesystem so other users in the company can easily access them and use them in different projects.

Generating documents

To demonstrate the document generation we’ll use:

  • the pre-installed HTML document template for RepoDoc,
  • the standard EAExample.eap model that is shipped with every Enterprise Architect and is typically stored in the c:\Program Files (x86)\Sparx Systems\EA directory.

Please install RepoDoc first and follow these steps:

  1. Open the EAExample.eap model in Enterprise Architect and select the UML Modeling package in the Project browser.
  2. Right-click on the selected package and choose Extensions -> RepoDoc -> Control Panel. RepoDoc starts and presents itself with the Document generator form.
  3. Select the About dialog and click the Download license key button if your are using RepoDoc for the first time. Then switch back to the Document generator.
  4. Click the ... button in the first row and select the UML-model-documentation.html.rdt template from the dialog.
  5. Click the Generate document button. RepoDoc generates a HTML documentation for the UML Modeling package and outputs information similar to this one: formdocumentgenerator

Please see the user guide for further details and capabilities.

Document examples

RepoDoc comes with several pre-installed document templates. You’ll find these templates in the RepoDoc installation directory C:\Program Files (x86)\Archimetes\RepoDoc\DocumentTemplates\Input or you can download the templates from the website. The document examples based on these templates are depicted below.

UML model documentation based on the HTML template.


Class diagram documentation created with the AsciiDoc template and Asciidoctor-pdf.


Element relationships across an Archimate model created with the DOT template and Graphviz.


JSON formatted list of packages and diagrams in the model created with JSON template.


Creating document templates

Feel free to modify the pre-installed templates or create new templates easily in any text editor. RepoDoc makes use of the Enterprise Architect class model and follows a similar logic as the built in document generator where a template is structured into one or more sections. The following template example contains one Package section and one Element section.

Package name: $Package.Name.
[Element $Element.Type=="Class"]
Element name $Element.Name has $Element.AttributeCount attribute(s).

This template tells RepoDoc to document name and the number of attributes for each element that is of type Class. We’ll demonstrate the document generation on a package containing several classes of a platform independent model.


Using the template above and the selected package the RepoDoc produces following document:

Package name: Abstract Class Model.
Element name Account has 5 attribute(s).
Element name LineItem has 1 attribute(s).
Element name Order has 3 attribute(s).
Element name ShoppingBasket has 1 attribute(s).
Element name StockItem has 5 attribute(s).
Element name Transaction has 2 attribute(s).

You can quickly turn the result into a HTML document by adding HTML tags into the template.

<head>RepoDoc example</head>
<table border="1">
<tr><td colspan="2">Package name: $Package.Name</td></tr>
<tr><th>Element name</th><th>Number of attributes</th></tr>
[Element $Element.Type=="Class"]


or a LaTex document by adding some LaTex markup to the original template.



RepoDoc example

\multicolumn{2}{|c|}{Package name: $Package.Name.} \\
Element name & Number of attributes \\
[Element $Element.Type=="Class"]
$Element.Name & $Element.AttributeCount \\