ni.com is currently experiencing issues.

Support teams are actively working on the resolution.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Tranfering parameters to DIAdem from batch file error.

Solved!
Go to solution

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

 

 

0 Kudos
Message 1 of 6
(3,527 Views)
Solution
Accepted by prophecy13

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.

 

 

0 Kudos
Message 2 of 6
(3,505 Views)

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

0 Kudos
Message 3 of 6
(3,498 Views)

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,

 

 

Regards,

Sil.VI
0 Kudos
Message 4 of 6
(3,456 Views)

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.

see http://forums.ni.com/t5/DIAdem/Tranfering-parameters-to-DIAdem-from-batch-file-error/m-p/3547783#M22...

 

Best regards

 

 

 

0 Kudos
Message 5 of 6
(3,443 Views)

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!

 

Regards,

Sil.VI
0 Kudos
Message 6 of 6
(3,422 Views)