Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Polymorph on September 23, 2016, 01:41:55 am

Title: Returning Diagrams using Model Documents and SQL searches
Post by: Polymorph on September 23, 2016, 01:41:55 am
I have diagrams scattered throughout my model and want to find a way to collect all of these together into a report.

I was hoping to use model searches help in this process and have written a search that finds a list of packages that contain the diagrams I want. I have then created a «model document» that uses this search to find the elements...

From reading one of Geert's tutorials (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/)), I see that the results of an SQL search must be placed in the 'element' section of the model document

(http://s14.postimg.org/u02kcbmw1/Capture.png)

I've done some test and have satisfied myself that EA is finding the right packages in the model, becuase I can make it print out the names of the packages into my document...
But I don't know I construct a template that can actually print the the diagrams within the packages.

Help!!!
Title: Re: Returning Diagrams using Model Documents and SQL searches
Post by: Eve on October 03, 2016, 08:51:48 am
I think you'll find that the sql search works on the elements, not the packages (and contained elements)

To report on the desired elements join the diagram package id directly with the element package id.
Title: Re: Returning Diagrams using Model Documents and SQL searches
Post by: Geert Bellekens on October 03, 2016, 03:37:50 pm
The weird thing is that packages are elements too, but they do not behave exactly the same.

Whenever I needed packages I used the "drag package onto model element" way. Only when I need to report on a set of elements I use an SQL search.

But I do use VBScripts to create my model documents based on the packages so I don't have to drag them manually.

Geert