Topic
4 replies Latest Post - ‏2012-04-11T21:12:21Z by ChristiFore
ChristiFore
ChristiFore
6 Posts
ACCEPTED ANSWER

Pinned topic Custom Export Numbering

‏2012-04-11T16:34:48Z |
We have a module that includes several different views that represent different documents. We then do a basic Word export into different base templates which add a front page and TOC. What we are wondering is if there is a .dxl scrip which would allow us to leave off the DOORS numbering scheme and add a custom scheme based on the template being exported into. We have some users that don't like it when we skip numbers even though some objects are not included in every view and they want to be able to simply renumber the objects based on what is included in the view being exported. I am a total novice at coding .dxl (I have modified some scripts that I found and some that were given to us but have never written any on my own). Any and all help would be appreciated. Thanks.
Updated on 2012-04-11T21:12:21Z at 2012-04-11T21:12:21Z by ChristiFore
  • adevicq
    adevicq
    154 Posts
    ACCEPTED ANSWER

    Re: Custom Export Numbering

    ‏2012-04-11T16:43:51Z  in response to ChristiFore
    Hi,

    It may be easier in this case to create a custom style in MS Word that automatically numbers your requirements. Could it fit your need?

    Alain
    • adevicq
      adevicq
      154 Posts
      ACCEPTED ANSWER

      Re: Custom Export Numbering

      ‏2012-04-11T16:44:56Z  in response to adevicq
      ... but your identifiers may change from one export to another if you insert requirements in you module...
  • llandale
    llandale
    2943 Posts
    ACCEPTED ANSWER

    Re: Custom Export Numbering

    ‏2012-04-11T17:58:31Z  in response to ChristiFore

    I think this a bad idea since the numbering will change between exports. That will be like talking to the "5th person in line" when the line keeps changing. Readers of the report are far better off seeing a paragraph and being able to tell which DOORS Object it is.

    Anyway, if you put the code below into an "int" AttrDXL and then display it, the objects should be numbered from zero on down based on the current display set. Be sure to Tools menu >>Refresh DXL Attributes before you export.

    int iResult
    Object oPrev = previous(obj)
    if (null oPrev) //
    then iResult = -1
    else iResult = oPrev.attrDXLName
    obj.attrDXLName = iResult+1
     
    //print iResult "\t" (identifier(obj)) "\t"
    //if (null oPrev)//
    //then print "top\n"
    //else print identifier(oPrev) "\n"
    


    -Louie

    Updated on 2014-01-06T19:46:36Z at 2014-01-06T19:46:36Z by iron-man
    • ChristiFore
      ChristiFore
      6 Posts
      ACCEPTED ANSWER

      Re: Custom Export Numbering

      ‏2012-04-11T21:12:21Z  in response to llandale
      I understand your concern however the sections in each document are static so once the format is set it won't change very often. It will however be different for each document type but we really only use 2 type. One is the standard numbering and the other is a subset of the standard. I'll give your code a try.