![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
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 |
![]() |
![]()
|
![]() Answer: ![]() | |
![]() |
|
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 |
|
![]() |
|
![]() |
|
Attached function "fStripRT" strips that stuff away. Try:
string old = fStripRT(string hst.oldValue) Good function. You're welcome. - Louie |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
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 |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
How to get rid of markup codes
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.