Book a Demo

Author Topic: Document generator scripting  (Read 4165 times)

royvanmarrewijk

  • EA User
  • **
  • Posts: 61
  • Karma: +1/-0
    • View Profile
Document generator scripting
« on: August 26, 2015, 06:33:20 pm »
Hi,

I would like to generate a document which presents all the diagrams that belongs to a specific element. As a solution for this I created a document template with the sections package->element. Within the element section I refer to a fragment which collects all the diagrams with a script (JScript).

So I have al the data I need but the only thing left is that I can't figure out how to show the diagramImage of the data.

If anyone can tell me how to do this I would really be helped.

Kind Regards,
Roy van Marrewijk

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Document generator scripting
« Reply #1 on: August 26, 2015, 06:48:22 pm »
Roy,

You can't show a diagram image in a script fragment.
You can only do that in a "regular" fragment or template.

If the diagram is owned by the element you can use the section package->Element->Diagram for this.

Or is the diagram owned by another element or package?

Geert

royvanmarrewijk

  • EA User
  • **
  • Posts: 61
  • Karma: +1/-0
    • View Profile
Re: Document generator scripting
« Reply #2 on: August 26, 2015, 07:01:55 pm »
He Geert,

Thanks for your replay!

The problem is that the diagrams ar distributed over the model, so the diagrams are owned by other packages / elements.

Do you know a solution for this problem?

Roy

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Document generator scripting
« Reply #3 on: August 26, 2015, 07:31:23 pm »
Roy,

I prefer the solution with the virtual document and model documents.
The advantage is that you can still manually intervene before actually generating the document.
The only thing you need to make sure is that you diagram is the only diagram (of a certain type) under its owner (element or package)
Otherwise the document generator takes ALL diagrams at that level.

The other option is to go for the "fully" scripted solution, but then you have to script the whole document generation using the API.

Simon revealed in this post: http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1440140359 that a hybrid solution is on the way, so it might be worth it to wait a bit before investing in the fully scripted solution.

Geert

royvanmarrewijk

  • EA User
  • **
  • Posts: 61
  • Karma: +1/-0
    • View Profile
Re: Document generator scripting
« Reply #4 on: August 27, 2015, 09:12:33 pm »
Geert,

Again thanks for your replay!

I think I wait for the hybrid solution and in the meantime I'll try to generate as much as possible.

Thanks for your support!  ;D