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: Building a Verification Section with WEXP
Topic Summary: I want to build a verification section based on an attribute using WEXP
Created On: 4-Dec-2007 16:02
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.
 4-Dec-2007 16:02
User is offline View Users Profile Print this message


Jake Huffman

Posts: 3
Joined: 14-May-2007

We are currently undergoing our initial deployment of DOORS and we are trying to use WEXP to generate our specification documents.
Our DOORS modules contain an attribute for verification text on how we want to verify the requirements. I would like to build a section with the structure of the requirements section, only with the verification text instead of the requirements text.

I guess the real issue is how to create a view that has an Object Heading and Text column when there is a Object Heading (so the outline structure is created) but where the Object Text is replaced by the Verification Text attribute. This view will be used as an inserted view after a verification header.

I am assuming that others have used this approach, and any help would is appreciated.

Thanks.
Report this to a Moderator Report this to a Moderator
 4-Dec-2007 18:45
User is offline View Users Profile Print this message


Richard Good

Posts: 152
Joined: 22-Mar-2005

Make sure you have a text column called "Verification Text"
Then create an text "attribute dxl" called "My Main Col"
Then add the following code to it: -

-------------------------
Regards,

Richard Good
Report this to a Moderator Report this to a Moderator
 4-Dec-2007 20:12
User is offline View Users Profile Print this message


Jake Huffman

Posts: 3
Joined: 14-May-2007

Richard,

Thanks for the response, the code exports the text, but it doesn't retain the structure to export the headings as "Heading 2", "Heading 3", ... in order for the exported Word document to facilitate outline numbering and TOC, etc.

Is there a way to access that information?
Report this to a Moderator Report this to a Moderator
 4-Dec-2007 21:10
User is offline View Users Profile Print this message


Peter Albert

Posts: 232
Joined: 30-Dec-2005

Hi Jake,

I could see the following solution:

Create a view with two columns, one showing the Object Heading only, one showing your verification text attribute. When you export it to Word, the Headings will get the correct style, however, all attributes will be preceded by either the string "Object Heading:" or "Verification text:" (or whatever the name of your attribute, or the column title, respectively, is). You can, however, use a Word macro to remove all occurrences of the attributes names and automatically call this macro after the export. The macro would look like this (note that the attribute name is followed by a tab character (^t):

Sub ReplaceBy(ReplaceWhat, ReplaceBy As String)
'
' Replace a string in the complete document
'
Selection.HomeKey Unit:=wdStory
With Selection.Find
.ClearFormatting
.Text = ReplaceWhat
.Replacement.Text = ReplaceBy
.Execute Replace:=wdReplaceAll
.Forward = True
.Format = False
.MatchCase = False
.MatchWildcards = False
End With
End Sub

Sub mainMacro
Call ReplaceBy("Object Heading:^t", "")
Call ReplaceBy("Verification Text:^t", "")

End Sub


Just put the macro in the template document, add "mainMacro" in the field "Execute Word Macro" behind the "Advanced" button and you should be done.

Cheers,

Peter
Report this to a Moderator Report this to a Moderator
 5-Dec-2007 00:43
User is offline View Users Profile Print this message


Jake Huffman

Posts: 3
Joined: 14-May-2007

This is really the same end result as before, it doesn't build the verification section as an indentured word document. The text is there, but the document doesn't have a valid TOC without manual manipulation.
Report this to a Moderator Report this to a Moderator
 5-Dec-2007 15:57
User is offline View Users Profile Print this message


Richard Good

Posts: 152
Joined: 22-Mar-2005

You may have to chop out a few things from this script but it should do the job of applying heading styles based on the number of dots - enjoy.

-------------------------
Regards,

Richard Good
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.