Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: utkarsh on April 29, 2008, 05:11:42 pm

Title: Create a RTF from API
Post by: utkarsh on April 29, 2008, 05:11:42 pm
Hi,

Is it possible to create a RTF file using API exposed by EA through code?
I will be thankful for any help for suggesting alternative ways to create a RTF file. I need to generate a rtf for a addin I am writing.

Thanks.
Title: Re: Create a RTF from API
Post by: Eve on April 30, 2008, 08:04:06 am
Are you looking for Project.RunReport?  (http://www.sparxsystems.com.au/EAUserGuide/index.html?project_2.htm)
Title: Re: Create a RTF from API
Post by: utkarsh on April 30, 2008, 08:42:31 pm
Thanks for your reply.

I tried Runreport() method but the generated RTF is not according to the template specified. Can you please guide me where are the templates provided by EA are stored? How can I access them?

Thanks in advance.
Title: Re: Create a RTF from API
Post by: Eve on May 02, 2008, 08:15:43 am
The default templates are internal to EA, the user templates are stored in your model.

I don't think that either are available to the automation interface.
Title: Re: Create a RTF from API
Post by: Dermot on May 02, 2008, 03:16:31 pm
One point to note with the Automation RunReport() - it allows for both the legacy RTF report generator templates, as well as the new report templates.  If you do have templates of the same Name in both the legacy and the new, then you can run into a problem of one being generated when it not what is expected.  So check both the new and  the legacy report template names and ensure there is no mix up.

I would suggest you create a simple template of unique name and re-test your call to RunReport().