Author Topic: Diagram using fragments  (Read 1781 times)

Hermont

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Diagram using fragments
« on: August 11, 2016, 04:56:50 am »
Is it possible to use Custom SQL in Template fragments to return diagram images?
If not which options can we use? I'm kind of new to all of this document generation.
I've tried to read the documentation but couldn't find anything on this topic. Thanks!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8773
  • Karma: +216/-26
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Diagram using fragments
« Reply #1 on: August 11, 2016, 08:54:32 pm »
No, SQL fragments cannot return diagram images.

You can do so in regular fragments, or document script fragments.

Geert

Hermont

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Diagram using fragments
« Reply #2 on: August 11, 2016, 09:17:54 pm »
Thank you Geert.  :)
Will try.

Hermont

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Diagram using fragments
« Reply #3 on: August 12, 2016, 01:05:02 am »
Any info on how can I return the diagram image to my template using document script?
All examples I could find focus only on saving the diagram as a file.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8773
  • Karma: +216/-26
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Diagram using fragments
« Reply #4 on: August 12, 2016, 08:50:45 pm »
Document script requires to return raw RTF, so you might need to save the diagram image to file and then figure out some way to get that into RTF format.

See http://stackoverflow.com/questions/38844506/diagram-export-from-ea-to-document-file-using-open-xml-sdk for a similar question with regards to Open XML. If you are lucky you might even use that approach and find a library function somewhere that transforms that to RTF format.

Geert