Book a Demo

Author Topic: rtf export template  (Read 4246 times)

rastik

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • Yeah :)
    • View Profile
rtf export template
« on: March 10, 2003, 04:16:33 am »
hi guys,

i do not know how many of you are using rtf export (others are using html only?), for me it is one of the most important things, because for my colleagues (developers) if i do not have it in rtf (word doc respectively) then i do not have at all.
tweaking rtf style template i was able to change some things, but some are still not possible:
- description of a table after table itself (and not before)
- names of parameters of procedures in bold (so it is easily readable)
- default values of parameters mentioned (they are not currently)

how are you handling this? is it possible to solve it with style template alteration or is it just missing?
how can i create document with all thing i am using in my model? html pages do not look good on paper.

thx,
rw

Tjerk

  • EA User
  • **
  • Posts: 231
  • Karma: +1/-0
    • View Profile
Re: rtf export template
« Reply #1 on: March 10, 2003, 05:24:05 am »
Hi Rastik,

At this moment, adding or splitting model information in your RTF documentation is not supported. The keywords (in RTF #KEYWORD#) are limited to the set you will find currently in the RTF template.

You can create a new template in the resource tab. In this template you can change many RTF things, you need to know the RTF specifications for that. Don't forget to select the template when you create an RTF document!

So, to address your problems:
- Description of table after table: not supported. The table RTF code is not an item that can be configured in the template.
- Names of parameters in bold: not supported. The method line item RTF code only supports #SCOPE#, this item includes everything (notes, parameters, tags, etc.).
- Default values of parameters: not supported. See previous comments.

Sparx has mentioned to look into a more customizable RTF generator as part of a major upgrade including customizable code generators. So my guess is that this might take a while.

I'm currently working alot with RTF generation and I just post my requests for customation to Sparx. Some of them are then included, some are not.

Greetings and good luck,
Tjerk
P.s. If you are a real hacker, you might want to make your own RTF generator via the automation interface. I recently managed to get all model data unformatted to a Word document, but formatting will be a hell to make.

rastik

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • Yeah :)
    • View Profile
Re: rtf export template
« Reply #2 on: March 10, 2003, 05:49:06 am »
thanks for reply,
i am using customized template as you mentioned and the problems i have are mentioned in your message (not possible to break keywords or change order of items). but i managed to have things like sequence numbers for tables.

can you help with some (vba?) code to use the automation interface?

Tjerk

  • EA User
  • **
  • Posts: 231
  • Karma: +1/-0
    • View Profile
Re: rtf export template
« Reply #3 on: March 10, 2003, 11:11:43 am »
Hi Rastik,

I thought I had the code somewhere, but it got lost  :'(. When I find it lateron, I will post it here. For the moment, use the automation helpfile (see registered users/downloads on the Sparx site) and see the following discussions on automation, e.g.:

Via PHP and COM:
http://www.sparxsystems.com.au/cgi-bin/yabb/YaBB.cgi?board=general&action=display&num=1043271113&start=1

VBA
http://www.sparxsystems.com.au/cgi-bin/yabb/YaBB.cgi?board=general&action=display&num=1040254108&start=2

If you are really intent to create RTF using the automation interface, I (and probably some more people) am interest in the code.

Greetings,
Tjerk

rastik

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • Yeah :)
    • View Profile
Re: rtf export template
« Reply #4 on: March 11, 2003, 12:30:37 am »
hi tjerk,
i tried to use this code:

Sub EATest()

   Dim m_Repository As Object

   Set m_Repository = CreateObject("EA.Repository")
   m_Repository.OpenFile ("C:\Temp\BT1_3.EAP")
     
End Sub

i created new doc in word, then tools->macro->vb editor and pasted there this sub. then i clicked on run button and word has frozen. i suspect i am doing something wrong with word.

Tjerk

  • EA User
  • **
  • Posts: 231
  • Karma: +1/-0
    • View Profile
Re: rtf export template
« Reply #5 on: March 11, 2003, 01:06:48 am »
Hi Rastik,

My first guess is that the file needs to be closed properly. But I'm not a VBA programmer, I was just hacking when I tried that. So I hope some VBA programmer can help you along the way.

Did you managed to get hold of sample code from Sparx Automation explanations? If not, please try to get those code samples, that's what I used to get started.

Greetings,
Tjerk

rastik

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • Yeah :)
    • View Profile
Re: rtf export template
« Reply #6 on: March 11, 2003, 01:31:15 am »
after some investigation i found out that i should have ea running with that file open in it. i will try to do something with it.