Run a DIAdem Script from LabVIEW

Updated Nov 7, 2023

Environment

Software

  • DIAdem
  • LabVIEW

This article explain how you can automate DIAdem from LabVIEW.

The DIAdem Automation VIs are stored in C:\Program Files (x86)\National Instruments\LabVIEW VERSION\vi.lib\ExportToExcel and can be called in LabVIEW, where the path should be adjusted depending on your LabVIEW bitness and version.

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')