Book a Demo

Author Topic: Scripting - document generation - custom RTF Tables?  (Read 4588 times)

Tony D

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Scripting - document generation - custom RTF Tables?
« on: January 25, 2016, 04:13:10 pm »
I am experimenting with the output of documentation from the scripting interface.  Does anyone know how to output a custom table so that is formatted appropriately in the RTF?
I've researched how to generate rtf table formatting, but cannot work out how to output this to a document.  I've tried docGenerator.InsertText with the actual RTF encoding, but this doesn't work.

I am doing this in an attempt to circumvent the issues experienced trying to generate a matrix via query (see my thread: http://sparxsystems.com/forums/smf/index.php?topic=30165).  But I am not having much success using this approach either.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Scripting - document generation - custom RTF Tables?
« Reply #1 on: January 25, 2016, 06:15:23 pm »
Tony,

I would not even bother to use the documentgenerator class.
Since the last statement in the example script is
Code: [Select]
return reporting.GetDocumentAsRTF(); I assume that you can simply return RTF from your script.
So if you have the RTF code for your table then I think you can simply return that.

Geert