![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Show Changes As Redlines Topic Summary: How to show changes as redlines Created On: 4-Oct-2005 16:46 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|||
Hello,
As part of our Requirements Volatility reporting, I have a script that examines all changes made to a formal modules' objects and records them into an Excel spreadsheet. Currently it contains "From" and "To" columns containing h.oldValue and h.newValue, respectively. In order to suppress all of the Rich Text stuff, I used the (undocumented?) plainText command. This results in the two columns containing just plain text without any of the formatting characters. This works fine except that I have to examine every entry to see what changed. I was hoping to be able to show the changes between the h.oldValue and h.newValue via redlines. DOORS has the ability to do this as evidenced by the Object Properties' History tab's "show changes as redlines" and the new Compare Modules Wizard functionality. Unfortunately, I have not had any success. I would be very grateful to any help you could provide. Thanks, Tim Perry |
|||
![]() |
|||
![]() |
|||
You can use the "diff" command to generate the redlining. Here is an example of its usage:
Buffer cmpPlatBuf = create() Buffer cmpBusBuf = create() Buffer resBuf = create() cmpPlatBuf = tgt.myAttrName cmpBusBuf = o.myAttrName diff(resBuf, cmpPlatBuf, cmpBusBuf, "\\cf1\\strike ", "\\cf3\\ul ") resBuf will now contain the differences between the other 2 buffers, with redlining. The results can then be displayed in a DOORS rich text input field. The next challenge is getting the rich text into Excel. Maybe use setRichClip to copy the rich text value to the system clipboard, then use an OLE function to paste it into Excel. ------------------------- Shawn Stepper shawn.e.stepper@wellsfargo.com |
|||
![]() |
|||
![]() |
|||
Shawn, Thanks for the reply. I'll look into the setRichClip function that you mentioned. Here is a copy of my code in its current state... I am making use of "diff" but I don't know that I am doing it correctly. Thanks, Tim // Display both the old value and the new value of the requirement for ease of evaluation by mgmt string oldV1 = richTextFragment( richTextNoOle( h.oldValue ) ) string newV1 = richTextFragment( richTextNoOle( h.newValue ) ) Buffer Difference = create Buffer From = create Buffer To = create From = oldV1 To = newV1 diff(Difference, From, To, "\\cf1\\strike ", "\\cf3\\ul ") string DiffString = stringOf(Difference) out << "," h.date "," stringOf h.type "," h.absNo "," h.attrName ",\"" oldV1 "\",\"" newV1 ",\"" DiffString "\"\n" |
|||
![]() |
|||
![]() |
|||
This will probably only show the changes as strike through and underline, you need to output a color table rtf header to map red and blue to cf1 and cf2 etc. You need something like the following: - "{\\colortbl;\\red0\\green0\\blue0;\\red0\\green0\\blue255;\\red0\\green255\\blue255;\\red0\\green255\\blue0;\\red255\\green0\\blue255;\\red255\\green0\\blue0;\\red255\\green255\\blue0;\\red255\\green255\\blue255;\\red0\\green0\\blue128;\\red0\\green128\\blue128;\\red0\\green128\\blue0;
\\red128\\green0\\blue128;\\red128\\green0\\blue0;\\red128\\green128\\blue0;\\red128\\green128\\blue128;\\red192\\green192\\blue192;}"
------------------------- Regards, Richard Good |
|||
![]() |
|||
![]() |
|||
This sounds great, but I don't seem to have a diff function and I don't see it listed in the help files. I am using 6.0 SR1 are are you using a newer version?
|
|||
![]() |
|||
![]() |
|||
I'm using DOORS 7.1. It's documented under "Miscellaneous" and under "History" in the DXL manual. According to the manual, diff was added in DOORS 7.0.
------------------------- Shawn Stepper shawn.e.stepper@wellsfargo.com |
|||
![]() |
|||
![]() |
|||
If you are using the NGC addins (Do you see the "Module-Scripts" menu?), you can use function "string Differences = fDeltaText(TextFrom, TextTo)" function.
Everyone can do this: Issue an "#include <example\include\deltabuff.inc>", put your from and the to text in buffers, and then issue: string Differences = deltaText(Buffer oldText, newText, 8,4). - Louie |
|||
![]() |
|||
![]() |
|||
A new tangent on this topic:
In a custom "was-is-why" export to HTML, I want to output redlining. Anyone ever combined the diff perm with the htmlText perm? I suspect I'll have to render the redlining changes in a layout DXL column, then use the htmlText perm to output that in order to get my redlined HTML. But I thought maybe someone out there might have a more direct approach. --Tom Edited: 17-Apr-2007 at 01:26 by Thomas Young |
|||
![]() |
|||
![]() |
|||
Over a year later while searching for a different issue, I came across this somewhat old post. I have since found a way to translate the diff perm's output into HTML markup. As this may not be in big demand, I will not post the code here. But if anyone is interested, I would be glad to email it.
Cheers, Tom |
|||
![]() |
|||
![]() |
|||
And on another tangent, I have used some tools in the past for comparing 2 text files, usually "C' code or whatever, where the user is presented with 3 window panes, usually file 1 on the left, file 2 on the right and a 'diff / merge' in the middle, where the user can opt in/out certain of the differences.
I was thinking of writing something similar in dxl to compare 2 doors modules (or potentially 2 baselines). Would anyone find that interesting? It fall in to the category of something I write "in my copious free time" so no rush, just wondering if there is demand for such a tool? ------------------------- Andrew Tagg Thales Air Systems, Melbourne Australia. andrew.tagg@thalesatm.com |
|||
![]() |
|||
![]() |
|||
Tom,
Thank you for you kind offer. Please send me the code. -Brian Brian_Kingsley@raytheon.com |
|||
![]() |
|||
![]() |
|||
Andrew,
A diff/merge tool that worked on DOORS modules as you described would be very interesting. The current DOORS module compare tool is harder to use and can be challenging to interpret the output. Brian_Kingsley@raytheon.com |
|||
![]() |
|||
![]() |
|||
Andrew,
I have attached a DXL file which I use for interactively comparing two modules / updating one module based on the difference w.r.t another module / baseline. The first dialogue box allows for the selection of the two modules / baselines and the list of common attributes used for the comparison. The second dialogue box has three main DBEs, one with the redlined differences and two for the original attribute values from the two modules. You can then choose to update one module based on the other module's attribute values. As you can change the list of attributes on the fly, you could even update different attributes for different objects, although this becomes tedious as you have to switch between the dialogue boxes. Other buttons on the second DB are for navigation, and for simple tasks like adding / deleting objects. There is also the option to join several selected objects. And finally, an experimental routine exists which finds the most similar object in one module w.r.t to the current object in the other module. This is helpful if some objects have just been moved around. The original routine was heavily based on #include files. I tried to create a single version of the file, but please let me know if I broke something / if something does not work as expected. Cheers, Peter P.S: The script needs Tony Goodmans miniExplorer, so make sure to put the correct #include file into the script.
Edited: 18-Aug-2008 at 14:05 by Peter Albert |
|||
![]() |
|||
![]() |
|||
Wow, excellent, thanks Peter, will try to fly this at the office tomorrow and will feedback results.
Andrew. ------------------------- Andrew Tagg Thales Air Systems, Melbourne Australia. andrew.tagg@thalesatm.com |
|||
![]() |
|||
![]() |
|||
As a side note, the deltaText function had a bug in it in 8.1. I don't know whether they've fixed it in 8.2 or beyond. My bet would be no.
------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|||
![]() |
|||
![]() |
|||
David,
thanks for the info. The script currently just uses the diff perm. I was always wondering whether it is worth investigating whether deltaText would provide better results. It seems I'll wait with this. Peter |
|||
![]() |
|||
![]() |
|||
I've fixed the bug myself. Is a problem with the Skip list they use not being emptied properly. But the results from both shouldn't differ.
------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|||
![]() |
Telelogic DOORS
» DXL Exchange
»
Show Changes As Redlines
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.