Topic
  • 18 replies
  • Latest Post - ‏2014-05-06T09:39:34Z by Tony_Goodman
ChrisHardy68
ChrisHardy68
28 Posts

Pinned topic Recommended Practices with DOORS

‏2012-10-18T23:03:05Z |

Over the years i often get asked about DOORS best practice, i.e objects should not include both Object text and Object heading, text objects should be leaf objects etc.

Sometimes checking these item can become labour intensive especially when it comes to reviews\audits.

To help my self with this I wrote the attached script which creates some columns to give a visual indicator of the "health" of the object.

I have included it here in case its of use to others.
I cant offer support on this but feel free to use it in your environments.
Designed and working on DOORS 9.4, may work with earlier versions

To install simply unzip the contents to the DOORS add ins directory
If this is done correctly then when you open a module you should see a "Syntax" menu option
Click on this and away you go.

Note this does use a lot of layout DXL so it may impact module performance.

Updated on 2014-04-23T06:51:20Z at 2014-04-23T06:51:20Z by ChrisHardy68
  • SystemAdmin
    SystemAdmin
    1084 Posts

    Re: DOORS Best Practice

    ‏2012-10-18T23:28:03Z  
    Thanks Chris - and good to see you on the forum.


    Paul Miller,
    Melbourne, Australia
  • PDU
    PDU
    86 Posts

    Re: DOORS Best Practice

    ‏2012-10-23T05:49:04Z  
    Hi Chris,

    very interesting,

    a useful script.

    Pierre
  • ChrisHardy68
    ChrisHardy68
    28 Posts

    Re: DOORS Best Practice

    ‏2012-10-25T23:19:37Z  
    Added another script that maybe of use to get report on numbers of links etc and also filter the required objects
    See
    https://www.ibm.com/developerworks/forums/thread.jspa?threadID=459947
  • ChrisHardy68
    ChrisHardy68
    28 Posts

    Re: DOORS Best Practice

    ‏2012-11-05T05:39:48Z  
    Hi,
    Have updated the script. Have added:
    More phrase analysis
    Made it easier to add/remove phrases

    Hope that helps
  • ChrisHardy68
    ChrisHardy68
    28 Posts

    Re: DOORS Best Practice

    ‏2012-11-06T03:57:25Z  
    Ok, one final update.
    Due to the performance of the script in large modules I have reworked this to use DXL attributes rather than dxl layout columns.

    This script creates columns to display the new dxl attributes and the columns are colored using a secondary attribute

    Note: if you want to use this script with DOORS 9.3.x or earlier then you need to modify the dxl.
    The lines to comment out are indicated in the script and are at the end of the file.
    (The changes are needed because DOORS 9.3.x can only sent the color of text within a column whilst DOORS 9.4 can set the background color)

    Hope that helps
  • PDU
    PDU
    86 Posts

    Re: DOORS Best Practice

    ‏2012-11-06T06:55:47Z  
    Ok, one final update.
    Due to the performance of the script in large modules I have reworked this to use DXL attributes rather than dxl layout columns.

    This script creates columns to display the new dxl attributes and the columns are colored using a secondary attribute

    Note: if you want to use this script with DOORS 9.3.x or earlier then you need to modify the dxl.
    The lines to comment out are indicated in the script and are at the end of the file.
    (The changes are needed because DOORS 9.3.x can only sent the color of text within a column whilst DOORS 9.4 can set the background color)

    Hope that helps
    Hi,

    work for me (DOORS 9.1), but with some adjustments :

    Lines 446 to 451,i have errors, so i must change
    
    (
    
    default 
    
    null)
    
    by
    
    (
    
    default 
    "Null")
    


    Lines 458 to 463 i must delete
    
    (
    
    default 
    
    null)
    
    for each.

    And of course i modify the end of Dxl as written in your message.
  • llandale
    llandale
    647 Posts

    Re: DOORS Best Practice

    ‏2012-11-06T19:51:15Z  
    • PDU
    • ‏2012-11-06T06:55:47Z
    Hi,

    work for me (DOORS 9.1), but with some adjustments :

    Lines 446 to 451,i have errors, so i must change <pre class="jive-pre"> ( default null) </pre> by <pre class="jive-pre"> ( default "Null") </pre>

    Lines 458 to 463 i must delete <pre class="jive-pre"> ( default null) </pre> for each.

    And of course i modify the end of Dxl as written in your message.
    <null> is the default default for all types of attrs.

    (default "null") will make the string "null" the default which is probably not want you want. I guess you want this:
    • (default (string null)), or
    • (default ""), or
    • you don't need that default phrase at all.

    -Louie
  • PDU
    PDU
    86 Posts

    Re: DOORS Best Practice

    ‏2012-11-07T07:13:03Z  
    • llandale
    • ‏2012-11-06T19:51:15Z
    <null> is the default default for all types of attrs.

    (default "null") will make the string "null" the default which is probably not want you want. I guess you want this:
    • (default (string null)), or
    • (default ""), or
    • you don't need that default phrase at all.

    -Louie
    Hi Louie,

    Lines 446 to 451 create attributes based on enumerated type with values :
    
    
    {
    "High", 
    "Medium", 
    "Low", 
    "Null", 
    "Empty", 
    "OLE", 
    "Heading"
    }
    


    This is why default value null don't work.

    Lines 458 to 463 create DXL attributes. I think default value has no meaning.

    Pierre
  • ChrisHardy68
    ChrisHardy68
    28 Posts

    Re: DOORS Best Practice

    ‏2012-11-08T04:35:02Z  
    Hi,
    Based on the feedback from Pierre i have modified the script to get around the "null" issue
    Also tidied up the code so hopefully its a bit easier to maintain and simplified some of the checking.
    Plus added an additional script to delete the attributes if not needed
  • PDU
    PDU
    86 Posts

    Re: DOORS Best Practice

    ‏2012-11-08T07:08:39Z  
    Hi,
    Based on the feedback from Pierre i have modified the script to get around the "null" issue
    Also tidied up the code so hopefully its a bit easier to maintain and simplified some of the checking.
    Plus added an additional script to delete the attributes if not needed
    Hi,

    just a little remark, textCheck don't work if the phrase is the first in the sentence. This case is possible (If ...)

    Pierre
  • ChrisHardy68
    ChrisHardy68
    28 Posts

    Re: DOORS Best Practice

    ‏2012-11-08T22:17:02Z  
    • PDU
    • ‏2012-11-08T07:08:39Z
    Hi,

    just a little remark, textCheck don't work if the phrase is the first in the sentence. This case is possible (If ...)

    Pierre
    Thanks for that.
    Here is a fix... although its a bit lazy :)

    After line 89 add
    string pad = \"xx \"

    After line 302 (function textCheck) add
    cont = pad cont pad

    This does mean that the phrase "If possible" will be reported twice,
    once for the "if" and once for the "If possible"

    so maybe alter line 147 from
    string phrases[] = {\"Will\", \"Can\", \"Could\", \"Should\", \"Would\", \"May\", \"Must\", \"Might\", \"If possible\", \"Ought\", \"Perhaps\", \"Probably\"}
    to
    string phrases[] = {\"Will\", \"Can\", \"Could\", \"Should\", \"Would\", \"May\", \"Must\", \"Might\", \"Possible\", \"Ought\", \"Perhaps\", \"Probably\"}

    Hope that helps
  • ChrisHardy68
    ChrisHardy68
    28 Posts

    Re: DOORS Best Practice

    ‏2012-12-02T22:11:18Z  
    Thanks for that.
    Here is a fix... although its a bit lazy :)

    After line 89 add
    string pad = \"xx \"

    After line 302 (function textCheck) add
    cont = pad cont pad

    This does mean that the phrase "If possible" will be reported twice,
    once for the "if" and once for the "If possible"

    so maybe alter line 147 from
    string phrases[] = {\"Will\", \"Can\", \"Could\", \"Should\", \"Would\", \"May\", \"Must\", \"Might\", \"If possible\", \"Ought\", \"Perhaps\", \"Probably\"}
    to
    string phrases[] = {\"Will\", \"Can\", \"Could\", \"Should\", \"Would\", \"May\", \"Must\", \"Might\", \"Possible\", \"Ought\", \"Perhaps\", \"Probably\"}

    Hope that helps
    Hi
    I nave made some updates to the code:
    Improved end of line checking for phrases,
    added new phrase category,
    corrected structure checking
    corrected link checking

    Taking this further what Id like to do is add a gui for adding removing phrases to the checking and I think rewrite the code so that is a pure script rather than trying to use dxl attributes or layout dxl ( both of which work fine but have issues with module performance)

    Hope that helps
  • ChrisHardy68
    ChrisHardy68
    28 Posts

    Re: DOORS Best Practice

    ‏2014-04-23T06:37:10Z  
    Hi
    I nave made some updates to the code:
    Improved end of line checking for phrases,
    added new phrase category,
    corrected structure checking
    corrected link checking

    Taking this further what Id like to do is add a gui for adding removing phrases to the checking and I think rewrite the code so that is a pure script rather than trying to use dxl attributes or layout dxl ( both of which work fine but have issues with module performance)

    Hope that helps

    Further update. Improved the handling of OLEs and pictures

     

    Attachments

    Updated on 2014-04-23T06:51:47Z at 2014-04-23T06:51:47Z by ChrisHardy68
  • Dartguru
    Dartguru
    23 Posts

    Re: DOORS Best Practice

    ‏2014-04-24T08:27:00Z  

    Further update. Improved the handling of OLEs and pictures

     

    Hi Chris,

    from reading this thread with interest I believe I need access to addins directory to be able to run your script as is, however I don't have access to addins.

    I think I understand most of the script and I know I'll need to comment out BackgroundColor as I use 9.2.5. If I put AttrDel.dxl and Syntax_A.dxl into a single script, can I load it up via Tools->Edit DXL and run it without doing anything unexpectedly bad?

    TIA

    Al

  • ChrisHardy68
    ChrisHardy68
    28 Posts

    Re: DOORS Best Practice

    ‏2014-04-24T08:52:54Z  
    • Dartguru
    • ‏2014-04-24T08:27:00Z

    Hi Chris,

    from reading this thread with interest I believe I need access to addins directory to be able to run your script as is, however I don't have access to addins.

    I think I understand most of the script and I know I'll need to comment out BackgroundColor as I use 9.2.5. If I put AttrDel.dxl and Syntax_A.dxl into a single script, can I load it up via Tools->Edit DXL and run it without doing anything unexpectedly bad?

    TIA

    Al

    Hi Al,

    Yes you can run the script from Tools -> Edit DXL

    To set up run Syntax_A.dxl

    If you want to remove all the attributes etc run AttDel.dxl

    So don't run them both together or they will add then remove everyhing :)

    It should not do anything bad as its only writes to the attributes it creates so its pretty self contained.

    Re the background colours -

    Note: if you want to use this script with DOORS 9.3.x or earlier then you need to modify the dxl.
    The lines to comment out are indicated in the script in function colCreate
    (The changes are needed because DOORS 9.3.x can only sent the color of text within a column whilst DOORS 9.4 can set the background color)

     

    Hope that helps

     

  • Dartguru
    Dartguru
    23 Posts

    Re: DOORS Best Practice

    ‏2014-04-24T09:01:20Z  

    Hi Al,

    Yes you can run the script from Tools -> Edit DXL

    To set up run Syntax_A.dxl

    If you want to remove all the attributes etc run AttDel.dxl

    So don't run them both together or they will add then remove everyhing :)

    It should not do anything bad as its only writes to the attributes it creates so its pretty self contained.

    Re the background colours -

    Note: if you want to use this script with DOORS 9.3.x or earlier then you need to modify the dxl.
    The lines to comment out are indicated in the script in function colCreate
    (The changes are needed because DOORS 9.3.x can only sent the color of text within a column whilst DOORS 9.4 can set the background color)

     

    Hope that helps

     

    Splendid, thanks.

    And thanks for the prompt reply

    Al

  • ChrisHardy68
    ChrisHardy68
    28 Posts

    Re: DOORS Best Practice

    ‏2014-05-01T07:22:49Z  

    Further update. Improved the handling of OLEs and pictures

     

    New update, re-wrote the structure checking and enhanced the phrase checking

     

    Attachments

  • Tony_Goodman
    Tony_Goodman
    77 Posts

    Re: DOORS Best Practice

    ‏2014-05-06T09:39:34Z  

    New update, re-wrote the structure checking and enhanced the phrase checking

     

    Nice one Chris!

    I have attached my offering for interest.

    This can also be found at http://www.smartdxl.com/content/?page_id=17

    Tony

    Attachments