Topic
3 replies Latest Post - ‏2013-12-05T18:34:12Z by llandale
llandale
llandale
2943 Posts
ACCEPTED ANSWER

Pinned topic Copying Attr Values

‏2013-11-25T15:29:52Z |

FYI.  I found the following perm that copies attr values.  I have found nothing wrong with this perm and am conficent it is superior to any other method where you stage the value in an attribute.  It seems to NOT use the string table and can therefore be used to copy 1000s of values in a single script.  OLE are copied OK.

Object oTo = object that wants new attr value

Object oFrom = object with attr value to be copied

string NameAttrTo  = Name of Attr to be updated

string NameAttrFrom = Name of Attr to be copied

noError()

set(oTo.NameAttrTo, oFrom.NameAttrFrom)

string ErrMess = lastError()

-Louie

 

 

  • pommCannelle
    pommCannelle
    41 Posts
    ACCEPTED ANSWER

    Re: Copying Attr Values

    ‏2013-11-28T09:52:22Z  in response to llandale

    Thx Louie .... always usefull to read your posts ;)

  • Searil
    Searil
    7 Posts
    ACCEPTED ANSWER

    Re: Copying Attr Values

    ‏2013-11-28T10:03:55Z  in response to llandale

    I need some help about the running the dxl script in the background with command line. Could you please look into the this question ? 

    https://www.ibm.com/developerworks/community/forums/html/topic?id=4b0b639d-8081-4c40-a10e-1622f10ac3b4&ps=25

    There is no much source for dxl and I am fairly new about this issue.

     

    Thanks in advance.

    • llandale
      llandale
      2943 Posts
      ACCEPTED ANSWER

      Re: Copying Attr Values

      ‏2013-12-05T18:34:12Z  in response to Searil

      "In Background" would mean "Batch Mode".   99% of the time you would write a script with these characteristics:

      • It starts
      • It hard-codes the names of whatever Projects/Folders/Modules are relevant
      • It does whatever it does
      • It ends, which ends the DOORS batch session.

      Usually you would use the "-b" batch command line switch, which opens DOORS without any GUI, runs after initialization, and ends DOORS when finished.  If you use the "-d" DXL switch, it will run with the familiar GUI but NOT end DOORS; which doesn't make sense to me for background processing but may make some sense as a desktop shortcut.

      The following debug sequence may be reasonable:

      • Get the script to work via the DXL window.
      • Get the script to work using the "-d" switch, which leaves DOORS running so you can explorer and find problems after the script runs
      • Get the script to work using the "-b" switch.  New errors will be discovered here such as if your script tries to "ack" or otherwise interact with the user; which is disallowed since there is no GUI.  The following may help if the script needs to be flexible:
        • if (batchMode())  //
        • then  do not ack or ask the user anything; default it all
        • else go ahead and ack or ask the user questions
        • ... or ...
        • create the dialog with all DBEs with default settings; do not realize nor show it.
        • if (batchMode())
        • then call the main "OK" button or apply callback; which reads
        • else realize and show the dialog
      • Use Windows Scheduler to run the batch script at night.

      -Louie