DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Run Diadem from batch file with parameters

Solved!
Go to solution

 Hi,

 

I use Diadem 2015 Advanced version for creating reports.

First I run batch file, and run Diadem with parameters from this batch file by command (e.g.) 

 

"C:\Program Files\National Instruments\DIAdem 2015\DIAdem.exe" "cT4:='C:\work'" "cT5:='123'" "/cScriptStart('D:\StartScript.VBS')"

I need send many parameters from batch file to DIAdem and I use various  DIAdem variables (T, L, B).

All is OK, when lenght of this command is less than 520 symbols, and when lenght of command is bigger than 520 symbols DIAdem doesn't run.

Error.png

 

How to resolve this problem?

 

Best regards.

 

 

 

 

0 Kudos
Message 1 of 4
(4,917 Views)
Solution
Accepted by topic author prophecy13

To avoid trouble using command line just switch to an alternative approach.

It is quiet simple to write vbs scripts using echo command.

@ECHO OFF
set STARTSCRIPT=%TEMP%\DIAdemBatchScript.vbs

echo ' Script to start DIAdem from batch > "%STARTSCRIPT%"
echo option explicit >> "%STARTSCRIPT%"
echo T4="C:\work" >> "%STARTSCRIPT%"
echo T5="123" >> "%STARTSCRIPT%"
echo ScriptStart("D:\StartScript.VBS") >> "%STARTSCRIPT%"
"C:\Program Files\National Instruments\DIAdem 2015\DIAdem.exe" "/cScriptStart('%STARTSCRIPT%')"

I would prefere this approach from any language because there are always limitations in length of command line options of any process.

It also helps debugging because you can run the script multiple times.

Message 2 of 4
(4,875 Views)

Hi AndreasK,

 

You approach work for me.

 

Thank you.

0 Kudos
Message 3 of 4
(4,867 Views)

worked for me as well, thanks

0 Kudos
Message 4 of 4
(2,384 Views)