Topic
2 replies Latest Post - ‏2013-01-23T18:33:03Z by SystemAdmin
SystemAdmin
SystemAdmin
3180 Posts
ACCEPTED ANSWER

Pinned topic add to word2.dxl export to display filter & baseline used in the word doc.

‏2013-01-22T20:16:57Z |
I am new to DOORS and have been struggling with this task. I need to capture the applied filter and the baseline used at the time of export and display them in a word document. I have no problem getting the information I need but I am having issues properly placing it in the new word document created from using the common word2.dxl file. Basically I use this file in conjuction with a template and need to place the information I found using built in DOORS commands after the table of contents by adding to the word2.dxl file. Any suggestions would be a great help, I am rather lost looking at the 3000 line code.
Updated on 2013-01-23T18:33:03Z at 2013-01-23T18:33:03Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    3180 Posts
    ACCEPTED ANSWER

    Re: add to word2.dxl export to display filter & baseline used in the word doc.

    ‏2013-01-23T07:04:49Z  in response to SystemAdmin
    Hello

    If you have an Information in a Dxl-Script and you want to put them somewhere into a word document which is created by an module export, you only can create an Doors-Dxl-Object, place your information and export it.

    Best regards
    Wolfgang
    • SystemAdmin
      SystemAdmin
      3180 Posts
      ACCEPTED ANSWER

      Re: add to word2.dxl export to display filter & baseline used in the word doc.

      ‏2013-01-23T18:33:03Z  in response to SystemAdmin
      Thank you for the input Wolfgang. I am still uncertain on how to assign the information to the object and then write the object to the word document. Below is some of the code I am working with. Basically I want to save the information given in the print lines to the Objects I created and somehow get that to the Word document. Could someone please explain to me the proper method of doing this? I am confused on putOLE and checkRes which I think are needed for this.

      //Definitions
      Module myMod = current
      string results = ""
      Filter myFilt = current
      string tempFilter = ""

      //create an object for baseliine, filter, and view to capture information to write to Word doc
      Object bObj = null
      Object filtObj = null
      Object viewObj = null
      //get the necessary information from the module

      //get the baseline applied at export
      //determine if a baseline exists or not
      Baseline b = getMostRecentBaseline(myMod)
      if b == null then {
      print "No baseline has been created in this module \n"
      }
      else {
      print "Baseline used at export: " version(myMod) "\n"
      }

      //get the current view to find the filter applied to the exported file
      string myView = currentView(Module myMod)
      print "View at export: " myView "\n"

      //get any filters that have been applied
      bool answer = filtering(myMod)
      if answer == false then {
      print "The filter for this view was not applied at export \n"
      }//end if
      else {
      if (! null myFilt) {
      tempFilter = stringOf(myMod,myFilt)
      results = results "DOORS filter applied at export : " tempFilter "\n"
      tempFilter = ""
      }
      else {
      results = results "No filter\n\n"
      }//end indented else
      }//end above else
      //display the description of the filter being applied
      print results
      Kind regards,
      Robert