Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: rupertkiwi on May 24, 2017, 10:14:46 am
-
Hi,
I am trying to generate a document using a template for a specific diagram.
Does anyone know a way of doing this?
I have tried using various filters in the template but can't seem to get it working.
Is it possible to do this using SQL and the diagram ID or name?
Thanks,
Rupert
-
Sorry Rupert,
I don't understand your question.
If you are trying to integrate a specific diagram into a document, so that you can get that document to "refresh" and pull in the latest version of the diagram from EA, then I'd recommend that you have a look at EADocX (an add-in which achieves that kind of document integration).
If not, can you explain what you're trying to achieve in a different way?
Andy
PS. Ian, I should get commission. ;D
-
Hi Andy,
Yes, I want to create a document which has several different diagrams in it but from different parts of a model.
That's why I want to 'choose' each diagram, I don't want all of them, only a select few.
Thanks,
Rupert
-
Unfortunately you cannot use SQL or Script fragments to get the image of the single diagram in your document.
Using virtual documents however you have the choice to either use element/diagram or package/diagram (depending on where your diagram is located)
You'll just have to make sure that the diagram you are after is either the only one under that element or diagram, or that it is the only one of a specific type (so you can filter the other types away in the template options)
In order to specify a package in a model document in your virtual document you can drag the package to the model document on a diagram. In order to specify a specific element I use a search called ElementByGUID who selects a single element based on it's GUID.
Mor information on my approach to document generation, and the things I've explained here ar on this article on my website: https://bellekens.com/2015/11/12/tutorial-generate-complex-documents-from-enterprise-architect-with-a-two-step-semi-automated-approach/ (https://bellekens.com/2015/11/12/tutorial-generate-complex-documents-from-enterprise-architect-with-a-two-step-semi-automated-approach/)
Geert
-
<ahem>
http://www.eadocx.com/
-
Maybe you should change your by-line to read:
Sun Tzu - "If you sit by the river long enough, eventually everyone will take your hint to use EADocX."
-
Do you need it to be dynamically generated from SQL?
If you need is satisfied by static diagrams then you can drag and drop the diagrams you want onto another diagram - Choose the Diagram Frame option when you drop it.
-
Maybe you should change your by-line to read:
Sun Tzu - "If you sit by the river long enough, eventually everyone will take your hint to use EADocX."
;D