Topic
23 replies Latest Post - ‏2014-04-25T16:42:44Z by Kyle_W
SystemAdmin
SystemAdmin
1299 Posts
ACCEPTED ANSWER

Pinned topic change bars

‏2009-06-22T13:25:34Z |
Hi,

I'm looking for a way to represent change bars in exported document. Does anybody know some elegant way, without much DXL-scripting?

Regards JuLi
Updated on 2012-08-28T07:14:19Z at 2012-08-28T07:14:19Z by Dragos.Cojocari
  • bwilliams
    bwilliams
    41 Posts
    ACCEPTED ANSWER

    Re: change bars

    ‏2009-06-25T09:19:47Z  in response to SystemAdmin
    hi Juli

    DOORS doesnt expose that information through its APIs at this time.

    So in order to accomplish this you do need to use either layout DXL or attribute DXL.
    The layout DXL option is only suitable if the change status of DOORS table cells is not important.
    If it is then you must use attribute DXL.

    The DXL isnt very complicated, and once you create an attribute that takes its value from the DXL, you can report on that attribute from RPE just like any other attribute.

    Here is some code that you can use.
    It is currently set up to set the attribute value according to changes since baseline 1.0, but you can change this by changing the iMajor and iMinor variables. If you always wanted it to compare against the last baseline that could be easily achieved also..

    
    
    /* This attribute DXL was generated on 10/06/2009 14:53:26. */   
    // prevent dxl timeout dialog pragma runLim, 0   Buffer bsz = create   
    
    void endAttributeDXL() 
    { 
    
    if (!
    
    null obj && attrDXLName != 
    "") 
    { obj.attrDXLName = richText tempStringOf(bsz) 
    }   delete bsz 
    }   
    
    void display(string s) 
    { bsz += s bsz += 
    "\n" 
    }   
    
    void displayRich(string s) 
    { bsz += s bsz += 
    "\n" 
    }   
    //**********   bool bShowMarkup = 
    
    false 
    
    int iMajor =       1 
    
    int iMinor =       0 string sSuffix =   
    ""
    "" string sAdName =   
    "Object Text" string sNewTxt = 
    
    null string sOldTxt = 
    
    null string sNewHead = 
    
    null string sOldHead = 
    
    null Module modBase Object oldObj Baseline b = baseline(iMajor, iMinor, sSuffix) 
    
    int iAbsNo = obj.
    "Absolute Number" 
    
    if(!
    
    null b) 
    { modBase = load(b,
    
    false) oldObj  = object(iAbsNo, modBase) 
    
    if(
    
    null oldObj) display 
    "NEW OBJECT" 
    
    else 
    { sNewTxt  = obj.sAdName sOldTxt  = oldObj.sAdName 
    
    if(bShowMarkup) 
    { Buffer bufOld = create() Buffer bufNew = create() Buffer bufRes = create() 
    
    if(
    
    null sNewTxt && 
    
    null sOldTxt) 
    { bufOld = sOldHead bufNew = sNewHead 
    } 
    
    else 
    { bufOld = sOldTxt bufNew = sNewTxt 
    } diff(bufRes, bufOld, bufNew) displayRichWithColor(stringOf(bufRes)) 
    } 
    
    else 
    { 
    
    if(sNewTxt != sOldTxt || sNewHead != sOldHead)       display 
    "CHANGED" 
    
    else display 
    "NOT CHANGED"  
    } 
    } 
    }   
    //**********   endAttributeDXL()
    

    Ive also attached an RPE template that will use an attribute created like this to show change bars.
    It assumes the attribute in DOORS is called 'DXL for Object Text changes from 1.0' but of course this can be changed.

    HTH !
    • SystemAdmin
      SystemAdmin
      1299 Posts
      ACCEPTED ANSWER

      Re: change bars

      ‏2009-07-01T13:51:50Z  in response to bwilliams
      thanks a lot,

      I tried to run your DXL-script as DXL-Attribute, the result (change state) was displayed as attribute value within DOORS, but not in the exported document. Even if I added new DOORS scheme and tried to print out the attribute value in a text element defined in DTA.

      I have solved my "problem" by defining an DXL attribute “Changed”
      
      Object o 
      
      for o in current Module 
      
      do 
      { 
      
      if ( modified o) o.
      "Changed"= 
      
      true 
      }
      


      For representation of the change bars I used the Border formatting properties in following way:

      left border color
      
      
      
      if(Changed==
      "True") 
      {
      "FF"
      }
      


      left border width:
      
      
      
      if(Changed==
      "True") 
      {
      "4“}
      


      Regards JuLi
      PS. btw, which tool do you use for DXL scripting?
    • kierant
      kierant
      29 Posts
      ACCEPTED ANSWER

      Re: change bars

      ‏2010-07-28T15:30:12Z  in response to bwilliams
      Just to add my two cents to this dialog that has been restarted - I still can't believe that Doors doesn't have a more easily accessible change indicator available out-of-the-box. I mean, an attribute that reflects the change bars and/or object history to summarise what happened in this baseline, and so can be filtered in Doors, used in RPE etc - I don't think it reasonable/acceptable that people should have to build DXL like the sample here (e.g. this code is just checking two attributes, it doesn't reflect other actions like moves, links etc).

      While this is obviously feedback for Doors and not RPE, I raise it here because this discussion gives a key example of where this is needed and where the deficiency is felt. I'll log a Request-for-Enhancement for Doors on this too.
    • DXLUser
      DXLUser
      27 Posts
      ACCEPTED ANSWER

      Re: change bars

      ‏2011-10-03T13:12:44Z  in response to bwilliams
      Hi,

      How did you get this to work on your RPE Word documents? The script works in DOORS, however it does not get published in RPE documents.
  • Neal_Middlemore
    Neal_Middlemore
    39 Posts
    ACCEPTED ANSWER

    Re: change bars

    ‏2009-06-30T08:05:23Z  in response to SystemAdmin
    JuLi,

    As RPE is so fast in producing documents, you could produce two Word documents, one from each baseline, then run the compare documents feature in Word. This will give you Word style markup based on the actual changes in the documents.

    Cheers
    Neal
  • mikesdrdoors
    mikesdrdoors
    18 Posts
    ACCEPTED ANSWER

    Re: change bars

    ‏2010-07-27T12:34:42Z  in response to SystemAdmin
    Hi,

    I'm also using the border to simulate change bars (within Word) plus an attribute within DOORS "Changes" that show changes. We compare current with a baseline and use this to update our change attribute.
    The result using RPE is near perfect except! When the Object text contains a carriage return line feed or other delimiter then the left borders stops at this point!

    Any suggestions

    Mike Grimsdale
  • Dragos.Cojocari
    Dragos.Cojocari
    1606 Posts
    ACCEPTED ANSWER

    Re: change bars

    ‏2010-07-28T15:01:31Z  in response to SystemAdmin
    Hey,

    if possible you might get better results using a table with no borders. In the first column you could put an image similar to the one in DOORS ( green for unchanged, red for changed).

    Regards,
    Dragos
  • Dragos.Cojocari
    Dragos.Cojocari
    1606 Posts
    ACCEPTED ANSWER

    Re: change bars

    ‏2010-07-28T16:02:22Z  in response to SystemAdmin
    Key Kierant,

    in RPE 1.1.1.2 we introduce a new attribute for the Object element named "modified". This attribute has two values ( true, false) that reflect the modified state of the object compared to the last baseline.

    Regards,
    Dragos
    • kierant
      kierant
      29 Posts
      ACCEPTED ANSWER

      Re: change bars

      ‏2010-07-29T08:48:33Z  in response to Dragos.Cojocari
      Hi Dragos - Thanks for the info. I still don't think RPE should have to be doing this work (should be coming from Doors). But one question that I've had to contend with when building DXL workarounds myself - will any change (any attribute) set the indicator to true? I think it is more suitable to only have those attributes that in Doors are marked to 'affect change bars'. But I'm guessing that would not be possible via RPE.

      One other point - as well as indicators, markup of what has changed is often needed (when you see something with change=true it could be a minor typo, or a total rewrite - you wouldn't know) - wondering if you've any plans in that regard?

      Kieran
  • mikesdrdoors
    mikesdrdoors
    18 Posts
    ACCEPTED ANSWER

    Re: change bars

    ‏2010-07-29T06:11:22Z  in response to SystemAdmin
    All,

    Thanks for the replies.

    Their is a basic problem here, when you set a border around text then this border stops when within the text their is a CRLF.

    This is not only a problem for me, in using left border for change bars, but for anyone using a border.

    Best regards

    Mike Grimsdale
  • mikesdrdoors
    mikesdrdoors
    18 Posts
    ACCEPTED ANSWER

    Re: change bars

    ‏2010-07-29T06:17:16Z  in response to SystemAdmin
    Dragos and All,

    We want to use change bars as this works within all documents (e.g. black white copies).

    The change Bar problem that I see is a basic problem within RPE borders:

    When you place a border around a DOORS text block this border will end at the end of the text (normal) or when the text contains Carriage Return.

    This means that it can only be used for a sentence, a paragraph can not be contained within a border when it has CR's.

    This needs correction.

    Mike Grimsdale
  • Dragos.Cojocari
    Dragos.Cojocari
    1606 Posts
    ACCEPTED ANSWER

    Re: change bars

    ‏2010-07-29T08:34:25Z  in response to SystemAdmin
    Hey Mike,

    this is a defect. Please submit a change request via support. Until this is fixed one workaround is to use tables where the first column contains the change bar and the second column contains the text. This will ensure that the change bar is showing for the entire text even when CR is present.

    Regards,
    Dragos
  • Dragos.Cojocari
    Dragos.Cojocari
    1606 Posts
    ACCEPTED ANSWER

    Re: change bars

    ‏2010-07-29T09:03:57Z  in response to SystemAdmin
    Hey Kierant,

    >> I still don't think RPE should have to be doing this work (should be coming from Doors).
    It is coming from DOORS, we just expose it in the schema so that it can be used in your templates.

    >> But one question that I've had to contend with when building DXL workarounds myself - will any change (any attribute) set the indicator to true?
    Yes. We are using the modified DXL perm to determine if the object has changed. This takes into account changes made to any of the object's attributes.

    >> I think it is more suitable to only have those attributes that in Doors are marked to 'affect change bars'.
    This would have to be an enhancement in DOORS.

    >> One other point - as well as indicators, markup of what has changed is often needed (when you see something with change=true it could be a minor typo, or a total rewrite - you wouldn't know) - wondering if you've any plans in that regard?
    As RPE is designed to be domain agnostic this kind of information ( and markup) has to come from the data source, in this case DOORS. If that is not available than you can use Microsoft Word's features to compare 2 documents generated from 2 versions of the same module. That will generate the output that you require.

    Regards,
    Dragos
  • mikesdrdoors
    mikesdrdoors
    18 Posts
    ACCEPTED ANSWER

    Re: change bars

    ‏2010-07-29T09:15:10Z  in response to SystemAdmin
    Hi Dragos and All,

    I have raised a service request trcking number:

    90405 019 866

    Now we live in Hope!

    Thanks Dragos

    Mike Grimsdale

    EADS-Astrium, Germany
  • mikesdrdoors
    mikesdrdoors
    18 Posts
    ACCEPTED ANSWER

    Re: change bars

    ‏2010-07-29T09:16:43Z  in response to SystemAdmin
    Hi Dragos and All,

    I have raised a service request tracking number:

    90405 019 866

    Now we live in Hope!

    Thanks Dragos

    Mike Grimsdale

    EADS-Astrium, Germany
  • Dragos.Cojocari
    Dragos.Cojocari
    1606 Posts
    ACCEPTED ANSWER

    Re: change bars

    ‏2010-07-29T09:21:57Z  in response to SystemAdmin
    Hey Mike,

    thanks for submitting it. We'll try to address this as soon as possible.

    Regards,
    Dragos
  • Dragos.Cojocari
    Dragos.Cojocari
    1606 Posts
    ACCEPTED ANSWER

    Re: change bars

    ‏2010-08-06T10:15:55Z  in response to SystemAdmin
    Hey Mike,

    >> I have raised a service request tracking number:
    >> 90405 019 866
    >> Now we live in Hope!

    this is fixed in the upcoming RPE release.

    Regards,
    Dragos
  • Rick.Ponty
    Rick.Ponty
    1 Post
    ACCEPTED ANSWER

    Re: change bars

    ‏2011-01-12T01:58:36Z  in response to SystemAdmin
    Dragos.Cojocari wrote:

    Though it cannot meet my demands, Finally got the certain info.
  • Gabriel.Sirtis
    Gabriel.Sirtis
    1 Post
    ACCEPTED ANSWER

    Re: change bars

    ‏2011-02-07T21:13:55Z  in response to SystemAdmin
    Neal_Middlemore wrote:
    JuLi,

    As RPE is so fast in producing documents, you could produce two Word documents, one from each baseline, then run the compare documents feature in Word. This will give you Word style markup based on the actual changes in the documents.

    Cheers
    Neal

    Now I got it, Thanks for your effort! It's very detailed, It is just the solution for my problem.
  • Dragos.Cojocari
    Dragos.Cojocari
    1606 Posts
    ACCEPTED ANSWER

    Re: change bars

    ‏2011-10-07T08:57:06Z  in response to SystemAdmin
    DxlUser,

    you cannot use DXL in RPE Templates. The script language supported by RPE is JavaScript.

    Regards,
    ragos

    RPE Actual
  • Moonpearl
    Moonpearl
    7 Posts
    ACCEPTED ANSWER

    Re: change bars

    ‏2012-08-27T22:46:07Z  in response to SystemAdmin
    We used the very useful dxl script from this thread succesfully for quite a while in conjunction with RPE for several purposes. But recently, having just upgraded to DOORS 9.3.0.7 it no longer works. The line: modBase = load(b,false) now gives us a null modBase every time. Is there a fix for this?
  • Dragos.Cojocari
    Dragos.Cojocari
    1606 Posts
    ACCEPTED ANSWER

    Re: change bars

    ‏2012-08-28T07:14:19Z  in response to SystemAdmin
    Hey,

    with RPE 1.1.2 we have introduced the "modified" attribute in the DOORS schema for RPE. That attribute will tell if the object has been modified since the last baseline or not. And for why the dxl script is no longer running you should raise the question on the DOORS forum.

    Regards,
    Dragos

    RPE Actual
  • Kyle_W
    Kyle_W
    18 Posts
    ACCEPTED ANSWER

    Re: change bars

    ‏2014-04-25T16:42:44Z  in response to SystemAdmin

    I have a similar setup as described above with trying to track changes but have problems with OLE's.

     

    I have a bolean field in DOORS using DXL that checks Heading/Text/Rationale against a predeteremined baseline ( i can change the baseline in the layout dxl to check against). If one of those attributes changes, its marked TRUE, if unchanged, its FALSE.

    I then have in RPE a condition looking for TRUE and if so, put a left border on the Paragraph element. This works fine for all text changes to Headings or Text. The problem is with OLE's. If i have an OLE object that has changed, my bolean see's it and its TRUE in DOORS. But in the output RPE does not put the left paragraph border on the entire OLE table/figure. Even if you use the modified attribute from RPE schema, i believe this same problem occurs. It realizes its a change but is not accurately getting a bar or border assigned to the entire object such as regular object text.

    The other basic question, is what does the RPE left border on the paragraph element equal in MS Word? Its not a cell border or a drawed line that i can move, so what is Word using to place this? Dragos can you elaborate on this feature within the element and how its transposed to MS Word?

    I'm only using left borders rather than an image because the image will only show at the first line of a paragraph. The left border approach also does not impact the alignment of the body text of a document as it seems to be put to the left of the printable area. Any other suggestions on how to display this, i'm all ears!