Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: philchudley on April 30, 2010, 12:07:50 am

Title: Using Model Document is Script or Automation
Post by: philchudley on April 30, 2010, 12:07:50 am
Hi All

Does anyone out there know if its possible (and if so how), to generate RTF from a Model Documemet using a Script?
I have a number of Model Documents, and would like to write a script that iterates a selection of Model Documents and generates the RTFs. This would much quicker than using the menu every time.

The closest I can get is the RunReport(string, string, string) methid for the Project Interface, but this uses a package GUID in XML

I tried passing the GUID of the Model Document (in XML) to this methd, but the RTF dialog is blank in the top text field and hence fails.

I could get the attribute of each Model Element, find the package, get its GUID etc, but this would only work if a Model Document had a single attribute.

Any assistance appreciated!

Cheers

Phil
Title: Re: Using Model Document is Script or Automation
Post by: beginner on April 30, 2010, 01:00:32 am
Phil,
the API offers reading and writing the model document (partly only via a file). There is a related recent thread discussing that. The help is clear enough, though (look for GetLinkedDocument). If you're after RTF generation like "convert HTML to RTF" this would be a different issue. I had fun with that recently.

b.