Example models and ScriptsEA models used to create the eaDocX sample and example documents. Plus scripts for even more advanced formatting of your eaDocX documents
This very simple script just shows what the parameters are which eaDocX will send to your Script.
It formats them a little bit, then just sends the result back to eaDocX. Use this just to make sure
that the API is working, and that eaDocX can call a script.
Show all Styles
This sample just shows you what the various kinds of Word paragraph style are which are defined for this document.
It will show:
- Table header, text, bullet and number list styles
- Inline normal, bullet and numbered bullet styles
It shows how you can make use of these Word paragraph styles to improve the appearance and readabilty of your documents.
The BulletList script takes each Element which is passed from eaDocX, and creates a simple bulleted list of the names of the elements. It will work for
any kind of element, so you might use this multiple times, for all the element types which you'd like to print as bullets.
It doesn't make use of any Word paragraph styles, for the formatted output might look a bit strange.
Bullet list 2
This builds on the BulletList sample, and prints both the Name - in bold - followed by the Notes.
Bullet list with Styles
This final Bullet List example uses a Word Paragraph style: the one which you have chosen in you document for the Inline Bullet style. You can
specify this in the eaDocX Options and Settings, Under Inline Settings.
This means the output will look more like other bullet lists which eaDocX generates, those which appear in the 'Notes' field of any element.
This example just prints the names, notes and author of an element, in a simple table.
The width of the table is hard-coded into the script. It doesn't use any Word paragraph styles.
This example shows how Scripting can deliver one of the most common feature requests which we have for eaDocX: more complex tables.
This example prints some simple attributes of
an element, in a table which has a more complex structure than is possible with regular eaDocX formatting.
Here, we have used HTML RowSpan tags to create a more compact structure to the table.
Table with Styles
This example shows how you can use the Word paragraph styles, as used by the rest of eaDocX, to create great-looking tables.
This is an example of the type of complexity for which you might use an eaDocX Script.
What we want to do is calculate the 'importance' of a Requirement, based on how many people want it, and how
much they want it. We have decided to link Requirements to Actors using a stereotyped Dependency, with a stereotype of "High", "Medium", "Low" or nothing.
The importance is then calculated - by the script - as (3 x Number of 'High' Dependencies) + (1 x number of 'Medium' Dependencies).
This is then printed in a table, with Importance values of > 10 being highlighted in red, 5-10 in yellow.
This script shows how you can use Scripting to both apply calculations to your eaDocX documents, and control the output formatting as well.
Get Lost project example EAP
Because all our documents are generated from EA models, first we need a Model! The 'GetLost' model is a teaching example which we created to show business analysts and designers how to
use Enterprise Architect, so it uses most of the important bits of EA - the bits you probably use every day. It's the example we use in our 'eaDocX Workshop' course.
The basic idea of 'GetLost' is that of an eco-friendly travel agent, which will help users to book travel in a variety of ways.
Exploring eaDocX EAP model
This is the EA model which was used to generate all the 'Exploring eaDocX' examples.
It is not intended to be a realistic EA model: all the elements are just called 'Requirement1, Requirement2..' etc. It just provides dummy data which allow the 'Exploring..' documents to show how different aspects of eaDocX can be used to create great documents.