Author Topic: Using Model Document is Script or Automation  (Read 2491 times)

philchudley

  • EA User
  • **
  • Posts: 744
  • Karma: +21/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Using Model Document is Script or Automation
« 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
Models are great!
Correct models are even greater!

beginner

  • Guest
Re: Using Model Document is Script or Automation
« Reply #1 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.
« Last Edit: April 30, 2010, 01:03:08 am by beginner »