Book a Demo

Author Topic: RTF Document generation with script  (Read 3599 times)

fatih

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
RTF Document generation with script
« on: May 06, 2014, 08:43:29 pm »
I have a project with a Documentation diagram that has Model Document elements on it. Each element has an assigned RTF Template, and packages dropped onto it. I normally create the document, simply by selecting the ModelDocument element, pressing F8, choosing a file name, and pressing 'Generate'.

This works fine, but I would like to automate this process through a Visual Basic script. It looks like there is a DocumentGenerator class, but I am not sure how to use it to generate the document similar to the manual process. Is there an example script for this? Such as, find the ModelDocument element with proper GUID, then generate document with its set rtf template and save it with certain name.

Thanks in advance.

Dermot

  • EA Administrator
  • EA User
  • *****
  • Posts: 591
  • Karma: +7/-0
    • View Profile
Re: RTF Document generation with script
« Reply #1 on: May 07, 2014, 11:19:39 am »
With the Automation DocumentGeneration - this is purely set to work directly with templates to provide more flexibility than the Virtual documents. It does no support running Model Documents - rather you set what templates to combine in the script.

For an example script - see the EA Scripting view:
Local Scripts | JScript - documentation example.