Run a DIAdem Script from LabVIEW

Updated Mar 6, 2020

Reported In

Software

  • DIAdem
  • LabVIEW

Issue Details

I want to run a DIAdem script (.vbs file) from LabVIEW. Where are the DIAdem automation VIs stored and how can I use them to remotely run a DIAdem script?

Is there a way to retrieve return values?

Solution

The DIAdem Automation VIs are stored in C:\Program Files (x86)\National Instruments\LabVIEW VERSION\vi.lib\ExportToExcel and can be called in LabVIEW.  

To automate the execution of a DIAdem Script from LabVIEW, you only need to use three VIs: 
  • DIAdem Open Reference.vi
  • DIAdem Run Script.vi
  • DIAdem Close Reference.vi
Use these three VIs in sequence and wire the path to your DIAdem Script (.vbs file) to the "script file" input of the DIAdem Run Script.vi and the DIAdem script should start when that VI is called. 

If you would like to get a return value you can use the DIAdem String Variable Get.vi to get the value of a DIAdem Auxiliary Variables like T1.
 

Additional Information

If you want to run the script in command prompt, you can also use the System Exec.vi in LabVIEW. The format for the DIAdem command line is: DIAdem.exe /CScriptStart('MyScript.vbs')