07-24-2007 03:11 PM
02-12-2019 08:27 AM
Is there a way i can load a file using command prompt in a running instance of Diadem Navigator ?
05-05-2020 06:50 AM
Hi,
I want to pass list of mf4 files to DIAdem script through command line and export PDF report based on specific template for each.
What is the best way to do it?
05-06-2020 06:28 AM
Hello,
My favorite way to process files from command line, is to have the command line call a script and the script will expect a file to exist in a specific path like c:/users/public/temp/Filelist.csv
Then before you call the command line, you make the Filelist.csv file. The VBS will then read the CSV file and do what you have coded in the script.
Paul
05-06-2020 06:51 AM
Thanks!
05-06-2026 08:05 AM
Is there a way to execute scripts from the cmd line prompt WHEN diadem is already open?
I have used the following code and it opens DIAdem and then executes the script. However running this multiple times will cause multiple open instances of Diadem.
"C:\Program Files\National Instruments\DIAdem 2021\DIADEM.exe" "/cscriptstart('C:\some script.VBS')"
Also can a variable be passed to the script when the called script runs? Similar to passing a global variable to a subscript when called by a main script?
Thanks
05-08-2026 10:28 AM
Hi Smooth,
The only way I know of to run commands on an existing DIAdem instance is to use ActiveX. I recently discovered how to call DIAdem via ActiveX from python, and python has command line execution options... would that be an interesting avenue for you to pursue? Alternatively, you could run a VBScript from the command line that connects to the existing DIAdem instance via ActiveX.
Brad Turpin
Principal Technical Support Engineer
NI / Emerson
05-13-2026 08:33 AM
hey Brad
You wouldn't have an example of how one would create an ActiveX object on via command line and then run the Diadem script?
05-14-2026 01:56 PM
Hi Tim,
I don't have anything specific to command line execution, but of course you can invoke a *.vbs or *.py file from the command line easy enough.
Here's sample code to connect to DIAdem and run commands from an external VBscript:
Set Dd = CreateObject("DIAdem.ToCommand")
Dd.CmdExecuteSync("LogFileWrite('" & now & "')")
Dd.CmdExecuteSync("WndShow('SHELL', 'MAXIMIZE')")
Call Dd.IntegerVarGet("ProgramVersion", DdVer)
MsgBox "DIAdem Version = " & DdVer
Set Dd = Nothing
Here's sample code to connect to DIAdem and run commands from an external python script:
import win32com.client
dd = win32com.client.Dispatch("DIAdem.ToCommand")
DdVer = dd.IntegerVarGet("ProgramVersion")
print(str(DdVer))
dd = win32com.client.Dispatch("DIAdem.TODataSheet")
is_locked = dd.bInterfaceLocked
ch_com = dd.ChnCommentGet("[1]/[3]")
print(str(is_locked))
print(str(ch_com))
Hope that helps,
Brad