Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
1 ratings:
 5 out of 5     Rate this Document

Automatically Running a Script When DIAdem Launches

Hardware: PXI/CompactPCI>>Controllers

Problem:
I would like to have a script automatically run everytime I launch DIAdem. How can I do this?

Solution:
DIAdem 10 and later
Beginning with DIAdem 10, there is a built in option that allows a script to run upon DIAdem starting up. Follow the steps below to use this setting.
  1. Launch DIAdem and open one of the DIAdem panels.
  2. Select Settings»Options»General.
  3. Click the Browse button under the "Start script" category.
  4. Select the script you want and press Open.
  5. Click OK and then exit DIAdem.
  6. Upon exiting DIAdem, a dialog box will appear asking you if you want to save your changes. Click Yes.
  7. A save dialog box will appear next asking you to save your DIAdem settings. Click Save.
  8. The next dialog box will ask you if you want to overwrite the existing file. Select Yes.
  9. Restart DIAdem and notice after the program starts, DIAdem runs the specified script.
In addition to this feature, you can also use the steps available for DIAdem 9.1 and earlier. For related issues, refer to the "Loading DIAdem with Start Parameters" section in the DIAdem Help by launching DIAdem and selecting Help»Contents. Then select the Contents tab and navigate to General»Launching DIAdem with Start Parameters.


DIAdem 9.1 and earlier
In DIAdem 9.1 and earlier, there is no built in option that allows a script to run upon DIAdem starting up. Therefore, the properties of the DIAdem executable must be modified. Follow the steps below to run a script upon DIAdem launching.
  1. Navigate to your DIAdem directory typically located at the path C:\Program Files\National Instruments\DIAdem 9.1.
  2. Right-click on DIAdem.exe and select Create Shortcut.
  3. Right-click the new shortcut and select Properties.
  4. In the shortcut tab, there is a textbox called Target with the path to the DIAdem executable. Append to the end of the text, /cscriptstart('path to your script'). For example, if you have a script on the C drive called Demo.vbs, the entire entry for the Target textbox should read:

    "C:\Program Files\National Instruments\DIAdem 9.1\DIADEM.exe" /cscriptstart('C:\Demo.VBS')
  5. After entering the above text, click OK.
  6. Double-click on the shortcut and notice after the program starts, DIAdem runs the specified script.


Related Links:
KnowledgeBase 4LMJ2I6X: What's New in DIAdem 10.0?

Attachments:





Report Date: 11/02/2005
Last Updated: 01/26/2009
Document ID: 3R1I4HEQ

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit