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: How to get rid of markup codes
Topic Summary:
Created On: 25-May-2004 19:29
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.
Answer This question was answered by Janet Ma, on Tuesday, May 25, 2004 9:19 PM

Answer:
C'est parfait. Thank you again, Louie
 25-May-2004 19:29
User is offline View Users Profile Print this message


Janet Ma

Posts: 115
Joined: 12-Sep-2002

I 've a sample script from my DXL course on how to print out object history:

I am getting the formatting codes for Object Heading which I would like to skip over and just get the string information from the history record. Does anybody know how to get rid of them?

Administrator 04/16/04 13:52:04 createObject
Administrator 04/16/04 13:52:09 modifyObject
attribute Object Heading from to \{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033\{\\fonttbl\{\\f0\\fnil\\fprq1\\fcharset0 Arial;\}\} \{\\colortbl ;\\red0\\green0\\blue0;\} \\viewkind4\\uc1\\pard\\cf1\\f0\\fs28 MR 37\\par \}
Administrator 04/16/04 14:01:37 modifyObject
attribute MR from to \{\\rtf1\\ansi\\ansicpg1255\\deff0\{\\fonttbl\{\\f0\\fnil\\fprq1\\fcharset0 Times New Roman;\}\} \{\\colortbl ;\\red0\\green0\\blue0;\} \\viewkind4\\uc1\\pard\\cf1\\lang1033\\f0\\fs20 37\\par \}
Administrator 04/16/04 13:52:26 createObject
Administrator 04/16/04 13:52:37 modifyObject
attribute Object Heading from to \{\\rtf1\\ansi\\ansicpg1255\\deff0\{\\fonttbl\{\\f0\\fswiss\\fprq2\\fcharset0 Arial;\}\{\\f1\\fnil\\fprq1\\fcharset0 Times New Roman;\}\} \\viewkind4\\uc1\\pard\\lang1033\\f0\\fs20 HIDS FW SRS (700226) \\f1\\par \}
Administrator 04/16/04 13:52:59 modifyObject
attribute Object Text from to \{\\rtf1\\ansi\\ansicpg1255\\deff0\{\\fonttbl\{\\f0\\fswiss\\fprq2\\fcharset0 Arial;\}\{\\f1\\froman\\fcharset0 Times New Roman;\}\} \\viewkind4\\uc1\\pard\\li720\\lang1033\\f0\\fs20 3.2.8.1.b Staff Intercom (OC1) - The UCD shall provide the user with a Staff Intercom service capability as described in the UCD OI ICD (GD Canada document No. 700138/A_G).\\par \\pard\\f1\\fs24\\par \}
Administrator 04/16/04 14:01:49 modifyObject
attribute Allocation from to HIDS
Janet Ma 05/25/04 10:41:58 modifyObject
attribute Allocation from HIDS to HIDS
TMHS

Edited: 25-May-2004 at 19:34 by Janet Ma
Report this to a Moderator Report this to a Moderator
 25-May-2004 19:51
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Attached function "fStripRT" strips that stuff away. Try:
string old = fStripRT(string hst.oldValue)

Good function. You're welcome.

- Louie
Report this to a Moderator Report this to a Moderator
 25-May-2004 21:19
User is offline View Users Profile Print this message


Janet Ma

Posts: 115
Joined: 12-Sep-2002

Answer Answer
C'est parfait. Thank you again, Louie
Report this to a Moderator Report this to a Moderator
 26-May-2004 07:22
User is offline View Users Profile Print this message


Dave Robbins

Posts: 36
Joined: 9-Dec-2003

Note, there is ( yet another ) hidden/undocumented DXL function called

plainOldValue & plainNewValue which give you the history less all the RTF artifacts.

as in:

string oldV = hr.plainOldValue
string newV = hr.plainNewValue

so Janets original example would look like:

// Exercise 27 - History report

/*
For every object in the module, export object history information in a
format similar to the history window to an output file "history.txt"

*/

Object o
History h

for o in current Module do {
for h in o do {
print h.author "\t" h.date "\t" h.type "\n"
if (h.type "" == "modifyObject") then {
string old = (string h.plainOldValue) //////////////////////////////////////////////////// change
string new = (string h.plainNewValue) ///////////////////////////////////////////////// change
print "attribute " h.attrName " from " old " to " new "\n"
}
}
}


regards,

-------------------------
Dave
+44 (0)23 9270 5711
david.robbins@astrium.eads.net
~~~~~~~~~~~~~~~~~~~~
EADS Astrium, Anchorage Road
Portsmouth. Hampshire. UK PO3 5PU

Edited: 26-May-2004 at 07:28 by Dave Robbins
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 0 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 0 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.