06-22-2009 01:41 PM
06-23-2009 12:48 PM
TestStand 4.2 does not have this feature; however, we do have an internal issue (#163169) to track this request. You can actually get the commandline passed to the TestStand Sequence Editor using the below psuedo code in a sequence; however, currently the TestStand Sequence Editor displays a prompt when it does not recognize a custom token on the command-line and there is no way to suppress this.
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);
One suggestion is to use a batch file to write the commands to a dedicated text file and then launch the sequence editor. You can then use a sequence in the sequence editor to read from the file.
Lastly, I just tried something and I do not necessarily recommend this, but I noticed that the Sequence Editor does not prompt when using the /goto token, so if I use the below command-line, it seems that no prompt appears, the goto command does nothing, and the psuedo code accesses the command-line tokens:
"C:\PathToApp\SeqEdit.exe" /goto "location tokens that do nothing" /run MainSequence "C:\PathToSequenceFile\GetCommandLineArgs.seq"
Keep in mind that NI does not necessarily support this but it does seem to work for now.
06-23-2009 01:12 PM
I just went ahead and did exactly as you suggested before I even had a chance to read your response and made a batch file that wrote the arguments to a text file which is parsed via a sequence callback in my process model. Your other solution seems pretty interesting though.
06-23-2009 03:03 PM
Another way might be to develope the Operator Interface which you can launch in editor mode. You should beable to add you own parsing for the command line.