Package A contains a diagram and some elements which are related to elements in Package B.
Diagram 1 contains all but element 4 from Package B and all the elements from Package A.
Package B contains a hierarchy of elements (parent-child relationship in the EA Project Browser) which is reinforced with Specialization relationships.
What I would like my document to look like:
[td]table of elements from Package A related to element 3[/td]
[td]table of elements from Package A related to element 5[/td]
[td]table of elements from Package A related to element 6[/td]
I created a document based on the diagram with the ‘contents, no diagram attribute set) which gives me a list of the elements on the diagram, but what I really want is a document including just the elements on the diagram but in a hierarchy as modelled on the diagram.
The challenge with documenting the contents of a diagram is ‘how to decide the order of printing’? When eaDocX asks EA for the contents of a diagram, we get back a flat list of elements. eaDocX will group similar-formatting elements together, and print them in order of Element type, but we can’t go much beyond that: we just don’t know any more. Printing from diagrams works well when the diagrams are either in a section by themselves or when they live in a package with no other element: stops too many duplicates from printing.
You have some alternatives:
1 – Document Package B, which will print elements 3,4,5,6 , then specifically exclude element4
– not sure how you can tell eaDocX to print only those elements which relate to these, which are just the ones which are in a specific package: you can restrict by the type of element, and the type of connection, which is the more normal way to do things. Even if eaDocX could do this, it would be a very fragile way to model.
2- create an EA Model View, and put your elements into that, and print the Model View in its own section.
I didn’t include scripting as another alternative, but if you’re feeling brave, then this is also an option.
If the elements are of a predictable type/stereotype, then you can write a little script in EA which is in effect a tiny generator. So long as it creates a string of well-formed HTML, then eaDocX will use it.
Such a script can then to really clever things like checking the parent element of something which you’re printing, and only printing the ones you want.
There are some examples on the website.
I’ve actually used a Report section based on an EA Search based on a SQL query which delivers my elements in the order that I want them sorted in. However when I view the document gernated in draft mode by EADocX it seems to have lost my sort order. Is this because I ran it in draft mode or does EADocsX never let you specify the order?
I have tried generating it in draft but this seems to hang my machine. Or to be specific EA becomes unresponsive and Word occupies 25% of my cycles on a 4 core machine. It seems to insert all the content OK but never seems to complete the step after that — of course I could be being too impatient but I have waited about an hour for it to complete with Word reporting the generated document to be only 10 pages long.
This reply was modified 9 years, 1 month ago by Neil Clayton. Reason: Added more detail
It should be able to generate a document that small in a few seconds – something’s clearly gone wonky.
A couple of ideas:
1 – is your SQL query a well-behaved one? Does it have the structure which eaDocX expects (see help)
2 – do you have a glossary? We’ve just had a really strange ‘hanging’ error where Word became un-responsive as eaDocX was trying to create the glossary: it didn’t like looking for the glossary entry ‘EA’ ! Very odd one, this. If you have one, try removing it, and trying again.
I did have a Glossary in it. I don’t think that my SQL was weird although it does return the Notes attribute.
A small part of me wonders whether it is to do with Word templates and where they are stored. I seem to remember from building a reporting engine that automated Word 2003 that you needed to be careful with where the Normal.dot template was as things could slow down greatly if Word couldn’t find one. I’ll investigate further on Monday.
Have tried again and restructured my Word doc to, I hope, better fit EADocX’s way of working but obviously have more of a problem than I thought! The sort order doesn’t follow the order in the Project Browser in my EAP file — no idea what I am doing wrong but presume I must have set an option somewhere that tells EADocX to ignore the EA sort order.
Happy to e-mail you an extract from my EA database and the Word doc generated if you let me know what e-mail address to send it to. 🙂
This reply was modified 9 years, 1 month ago by Neil Clayton. Reason: Couldn't add EAP attachment.
The problem with losing the EA sort order is known. I thought we had a forum posting about it, but I can’t find it….
The problem is that as you create elements under a package, EA shows the elements in the order you created them. But they have no explicit sort order in the DB. Only when you move one up/down (with the green arrows in the Project browser) does EA write sorting data to the DB, which eaDocX can use.
So, if the order in eaDocX is different from that in EA, just pick an element, move it up, then back down, then eaDocX will get the explicit ordering information. Same is true for Packages under packages.
It’s in the FAQ. I found it about an hour ago. My elements have quite a deep hierarchical structure and I discovered that I needed to move elements in each branch to get it to work right. Makes sense wen you think what is actually happening.
Now working well. 🙂
Viewing 11 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic.
Compare licence prices
Choose the licence that’s right for you and your team
Download eaTeamWorks today for several free for life features, plus no obligation, 30-day trials of all the products: eaDocX, ea Revision Manager, eaSheets, Model Expert and PortfolioManager. Discover for yourself why we sell the world’s best-selling Enterprise Architect extension.