11-28-2016 06:57 AM
Hi,
I have problem with tranfering parameters to DIAdem from batch file.
From batch file I run DIAdem by the follow command, and then I check this variable in VBscript:
"%DIADEM_PATH%" "/cT1:='%LogFile%'"
When "LogFile" variable is without spaces (e.g C:\work\log\2016_11_28.log) all is OK.
But I can't transfer variable LogFile with spaces (e.g. C:\work\log file\2016_11_28.log), because DIAdem receive only part of variable before first space
C:\work\log
How to check this?
Best regards
proph
Solved! Go to Solution.
11-28-2016 07:59 AM - edited 11-28-2016 08:05 AM
Your approach works like a charm with my DIAdem.
"C:\Program Files\National Instruments\DIAdem 2015\DIAdem.exe" "/cT1:='abc def'" /cMsgBoxdisp(T1)
Is it possible that assignment of
%LogFile%
failed?
P.S.: Which DIAdem version did you try? I checked with 2012/2015
P.P.S.: I like the approach of writing a vbs file and send it to DIAdem to execute.
' startDIAdem201611281502.vbs
T1 = "abc def" DataFileLoad "example.tdm"
and start DIAdem with
"C:\Program Files\National Instruments\DIAdem 2015\DIAdem.exe" "/cScriptStart('C:\temp\startDIAdem201611281502.vbs')"
this avoids almost any kind of errors because piping to an textfile is easy.
11-28-2016 08:33 AM - edited 11-28-2016 08:49 AM
Hi AndresK,
Yes, It seems that problem is in
%LogFile%
I found problem in the next line in batch file
set "LogFile=C:\work\log file\%date:~-4%-%date:~-7,2%-%date:~-10,2%_%time:~0,2%-%time:~3,2%-%time:~6,2%.log" -->ERROR set LogFile=C:\work\log file\%date:~-4%-%date:~-7,2%-%date:~-10,2%_%time:~0,2%-%time:~3,2%-%time:~6,2%.log -->OK
I use DIADEM 2015 Advanced version.
P.S. I need to specify this filename from batch file and send via variable to DIAdem
Best regards,
proph
11-29-2016 06:37 PM
Hi prophecy13,
Please correct me if I am misunderstanding this question, you are wondering why DIAdem accepts the path to your batch file without the space on the LogFile document but not when there is the space in between log and file, is this correct?
I have been looking about this issue I am not entirly sure but I would say that this might be the way that DIAdem is interpreting the characters being sent to the software. Is there a particular reason why you need to have the space on that address?
Warm Regards,
11-30-2016 01:08 AM
Hi s.jimenez,
I have solved this problem yet.
Problem was in the incorrect setting variable "LogFile". For batch file this variable was correct, but for Diadem wrong.
Best regards
11-30-2016 02:33 PM
Hi prphecy13,
thank you for your reply, I am glad to see that the issue solved ! I misunderstood that you were still having some issues with it.
Have a nice day!