Author Topic: Returning Diagrams using Model Documents and SQL searches  (Read 4813 times)

Polymorph

  • EA User
  • **
  • Posts: 133
  • Karma: +4/-0
    • View Profile
Returning Diagrams using Model Documents and SQL searches
« 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/), I see that the results of an SQL search must be placed in the 'element' section of the model document



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!!!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8083
  • Karma: +118/-20
    • View Profile
Re: Returning Diagrams using Model Documents and SQL searches
« Reply #1 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.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Returning Diagrams using Model Documents and SQL searches
« Reply #2 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