Author Topic: document all diagrams from search  (Read 452 times)

jimflip

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
document all diagrams from search
« on: May 04, 2022, 08:51:52 pm »
I have a need to search for a collection of diagram and then render them in my document, and I'm struggling to make this work.

I'm using a  Virtual document, thus I have a Model document that references a Model Search (simplified example):

SELECT ea_guid AS CLASSGUID, Diagram_Type AS CLASSTYPE, 't_diagram' as CLASSTABLE, Name FROM t_diagram

The model Document then references a Template:
package>
  diagram >
  < diagram
  element >
  < element
< package

This doesn't work.
I'm not sure if this is even possible, or if a different approach is needed.

Finding the whole document generation extremely brittle and frustrating!

Any suggestions?
« Last Edit: May 04, 2022, 08:54:30 pm by jimflip »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 11852
  • Karma: +460/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: document all diagrams from search
« Reply #1 on: May 04, 2022, 11:18:02 pm »
You'll have to start from either packages or elements.

Document generation templates are always based on either a package, or an element.

Geert

jimflip

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: document all diagrams from search
« Reply #2 on: May 04, 2022, 11:32:26 pm »
So I guess then I can't do it then!

As a package may have many diagrams, some of which are not necessarily in the set I actually want.
I don't see why diagrams aren't first class seeing as so much is driven by them in EA, feels inconsistent.

I'm increasingly wondering if scripting is the only realistic way of generating a report of any 'complexity' (or anything that doesn't violate the ad-hoc constraints of EA).  Although I suspect the API's might not support this either, perhaps some shenanigans with creating a temporary package, linking each diagram from my query to it, then rendering, then removing temp package from model.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 11852
  • Karma: +460/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: document all diagrams from search
« Reply #3 on: May 05, 2022, 04:28:18 am »
If you have packages with lots of unrelated diagrams you might need to rethink your model structure.
Usually diagrams have a "logical" location in the model as they represent "something". (e.g. a business process). The natural place for a business process diagram would then be underneath the Business Process Object

Geert

jimflip

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: document all diagrams from search
« Reply #4 on: May 05, 2022, 04:39:18 am »
In this case I'm looking for all diagrams that reference elements (Archimate Business Object) that have certain attributes.

A script looks like the way to go, seems a lot simpler for me to reason about, too much magic going on via UI and slow to iterate, I'm sure I'll find some more gotchas though!

DeBAAT

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: document all diagrams from search
« Reply #5 on: May 05, 2022, 03:36:53 pm »
For filtering on elements, I used a separate tag for filtering.
However, this might not work on diagrams.
On the other hand, I do see there is an option in the Diagram Properties which states "Exclude image from Documentation". Could this help to filter out the diagrams you don't want?