![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: History in Version 7 Topic Summary: Created On: 20-Jan-2004 11:43 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: The following prints a plain text version of the old value print (plainText h.oldValue) The following assigns an rich text version of an old value to an attribute o."Object Text" = richText h.oldValue | |
![]() |
|
Does anyone know how to properly handle history in V7, especially with Object Text? In previous version, one could assign the h.oldValue to a string and the print this string or use it as it was desired. In V7, if I do the following:
string oldVal = h.oldValue print oldVal I will get stuff like: {\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fnil\fcharset0 Times New Roman;}} \viewkind4\uc1\pard\lang1033\f0\fs20 Head Up Display (HUD) Symbology. sone new stuff\par } If I attempt to assign this to o."Object Text", the text ends up looking the same. I will admit I have little knowledge of RichText and its manipulation, but I have tried numerous things, to know avail. The only success I have had was to do the following: . RichTextParagraph rp Buffer old = create oldVal = h.oldValue for rp in oldVal do { oTxt = rp.text old += oTxt } This leaves the Buffer old with the correct "text" however, any bullets, indents are lost. What I would really like to do, is to undo history: attribute = h.attrName o.attribute = h.oldValue Thanks in advance Frank //print "Old:" stringOf (old) "\n" oTxt = stringOf (old) |
|
![]() |
|
![]() |
|
You forgot to mention that:
Text = o."Object Text" returns just the raw text, while Text = richText(o."Object Text") returns the rich text content without OLEs Text = richTextWithOle(o."Object Text") returns the rich text WITH OLEs. I don't see a "plainText" command anywhere. I ended up writing my own "fStripRT", but I needed different versions for DOORS v5 and for DOORS v6/7. v5 uses rt.text commands while v6 uses rtp.text commands. If memory serves, the rt.newline property behaves DIFFERENTLY between the versions (correctly in v5 but incorrectly in v6) disallowing one function to work in all DOORS versions; I hate it when that happens. The guts of the v6/v7 function are as follows: for rtp in InString do { Text = rtp.text OutBuff += CR // 1st time its nothing. OutBuff += Text CR = "\n" // each additional paragraph gets a CR } I would like to point out that v6/v7 Object Text is now rarely straight raw text; unless set by DXL its all rich text. That's why if you edit the Object Text of an empty object (one that appears to have a Paragraph Number in the Main column), then delete the text, the Paragraph Number disappears: the text is no longer empty since it contains useless skeleton rich text markup. - Louie |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
History in Version 7
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.