07-09-2012 03:07 AM
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
It's possible to access command line arguments in the following (pseudo-code) way:
Locals.AppMgrRef = RunState.Engine.GetInternalOption(InternalOption_A
Locals.CommandsRef = Locals.AppMgrRef.CommandLineArguments;
Locals.CountNum = Locals.CommandRef.Count;
For i=0 to Locals.CountNum - 1
Locals.CommandString = Locals.CommandRef.Item(i);
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
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
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
07-18-2012 10:46 AM
Thanks for helping during my absence (giving courses)!
I'll give you a kudo too..