07-09-2012 03:07 AM
Hi
I would like to read the command line parameters from TestStand startup. I did find an ActiveX resulting in a Object Reference (See Locals.CommandsRef). How do I use this reference to really get the arguments and their count? See also screenshot.
Solved! Go to Solution.
07-11-2012 07:57 AM
Hello Paulus,
It's possible to access command line arguments in the following (pseudo-code) way:
Locals.AppMgrRef = RunState.Engine.GetInternalOption(InternalOption_ApplicationManager);
Locals.CommandsRef = Locals.AppMgrRef.CommandLineArguments;
Locals.CountNum = Locals.CommandRef.Count;
For i=0 to Locals.CountNum - 1
Locals.CommandString = Locals.CommandRef.Item(i);
End
Do you want to use it with the actual TestStand Startup or rather with the start-up of a sequence file?
07-11-2012 08:20 AM
Hoi Thierry,
Thanks for the help. To start with the easyiest part: I would like to know the arguments of the starting sequence file.
Ik saw this pseudocode before but don't know what to do with it. I would like to read the arguments in TestStand. Where do I put this pseudocode? It makes no sense putting it in a TS-statement.
I tried to use ActiveX as seen in the sscreenshot. Is that a wrong direction? If correct, how should I go on with this Object reference.
07-18-2012 08:35 AM
Hi Paulus,
Via this link, you find an forumthread that describes the same issue. testStand does not support this, but there is a workaround. Attached you find the code.
The attachment includes a LV vi with the command line. If you doen't use Labview, here is the command line:
C:\Program Files (x86)\National Instruments\TestStand 2012\Bin\SeqEdit.exe /goto "Parameter1 = test" /runEntryPoint "Test UUTs" D:\Testsequence.seq
Regards,
Bas
07-18-2012 10:03 AM
Thanks for the solution. This works.
07-18-2012 10:46 AM
Hello Bas,
Thanks for helping during my absence (giving courses)!
I'll give you a kudo too.. 😉