Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: RTF exports - Ability to modify existing script to accomodate a template
Topic Summary:
Created On: 29-Jan-2008 00:14
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 29-Jan-2008 00:14
User is offline View Users Profile Print this message


Pranav Chandrasekhar

Posts: 101
Joined: 16-May-2006

Hi All,
This may be a rather dumb question but I figured I should ask anyway. For Microsoft Word exports, the export is based on a template file. RTF exports do not have such an option. Have any of you modified the existing RTF export script to accomodate a specifical template file? If so, I would appreciate it if you could let me know how you did this. Thank you.

Regards,

Pranav
Report this to a Moderator Report this to a Moderator
 1-Feb-2008 13:22
User is offline View Users Profile Print this message


Michael Eisele

Posts: 5
Joined: 28-Sep-2006

Hi Pranav,

I just created a custom RTF export script based on the original RTF export which also uses now an RTF file as a template. The template functionality is limited to providing a cover page, TOC, headers, footers etc. The bad message is that a major change to the standard RTF export is required, and that you have to cope with RTF tags.

I created this script due to the fact that WEXP is no longer supported by Teleleogic, and - what is more problematic -, does no longer run under DOORS 8.2 or later. So I incorporated all features we were using in WEXP. The advantage is speed. Module that took more than one hour to export by WEXP now exports in less than a minute.

I am willing to share this script, please send me a mail and I will send you the script.

best regards,

Michael

Send me mail
Report this to a Moderator Report this to a Moderator
 1-Feb-2008 13:41
User is offline View Users Profile Print this message


Paul Tiplady

Posts: 176
Joined: 28-Oct-2003

Pranav,

I started from scratch, with an exporter that uses RTF (for speed) and flexibility. It uses a two-pass process, although the first pass only has to be done once per 'template'. The template is a DOORS module, that contains all the fonts, styles, colours, attribute access scripts, header, footer and front-page information. A script parses this and creates a DXL include file. This is then included by the exporter, which spits out an RTF file for the current module, based on the template last parsed.

It can also auto-number figures and tables, using an attribute for the caption text; export objects as text (just object text/heading), table (all visible attributes as a table) or 'requirement' (all visible attributes as paragraphs); include sub-modules, if they are linked through a specific link module (preserving numbering and hierarchy if required); and other stuff.

I published a version here a couple of years ago, but it's been significantly improved since. The only problem I have is with the dialogue box on the front end, which ahs a habit of appearing to crash (throws up DOORS errors) then runs perfectly happily.

If you want a copy, I may be able to publish the latest version...

Paul.

-------------------------


Paul dot Tiplady at TRW dot com
TRW Automotive
Report this to a Moderator Report this to a Moderator
 5-Feb-2008 15:21
User is offline View Users Profile Print this message


Octavian Stanescu

Posts: 39
Joined: 28-Feb-2005

Hi,
Not only is 10x faster but it does not use the System Clipboard!

I am working on a similar script, but I implemented the template feature using a regular Word template and a temporary RTF file.
Not only you can have the template content formated easily in Word but you can insert your company picture, and define all kinds of fields TOC, Fields in Header/Footer, page numbers, bla, bla

1. The script opens a Word Template (OleAutoObj oActiveDoc)
2. Exports bookmarks, like WEXP
(each bookmark text from the template is updated with the info)
3. Creates a simple RTF file
cout << rtfHeader
cout << styleSheet
cout << fontTable
bla bla
4. Dumps all the objects
for o in document m do {
cout << richTextFragment(richTextWithOle o."Object Text", fontTable)
cout << rtfPara
bla bla
}
5. closes the rtf
cout << rtfEnd

6. using the OleMethod "InsertFile" on the original Word template to include the rtf content
put(oArgBlock, rtfFileName)
oleMethod(oActiveDoc, cMethodInsertFile, oArgBlock)
7. Word will import the rtf content relatively fast.

9. finaly update all fields in the oActiveDoc (TOC, page numbers, etc

I encountered a few problems though:

a. Picture export - solved by the following
when a picture object is found
- close the temp rtf file and imported to the word document
- export picture to file
- import the picture file (using the InlineShapes ole object)
- reopen the temp RTF file
- continue with the rest of the objects


b. Bullet list text within a table will crush the Word 2000
- the solution I found is to remove the bullet info
by parsing the RichText rt within the Object Text
Note: Word 2003 is working nicely without removing the bullets


Octavian
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.