NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Read Custom Command Line Arguments When Running Sequence

Solved!
Go to solution

Hi,

 

I would like to be able to run a sequence file and have it accept a custom command line argument. For example I would like to run "TestSequence.seq" with the string "2710" as an argument to the sequence file (when I run via command line), which will be saved in a sequence local and used as an input to one of my VIs in the sequence file. Can anybody help me with this?

 

I have tried to capture the command line argument with the ActiveX module using RunState.Engine.GetInternalOption(InternalOption_ApplicationManager) & property CommandLineArguments

but I get an error popup saying the argument is not recognized. 

 

image.png

 

Any help is appreciated.

 

Thanks

0 Kudos
Message 1 of 5
(3,125 Views)
Solution
Accepted by topic author jkerrigan12

I think you can only do this inside of a UI that you have the source code for.  See this: https://zone.ni.com/reference/en-XX/help/370052W-01/tsuiref/reftopics/applicationmgr_processusercomm...

 

Since you don't have the source code for the sequence editor you cannot trigger that event and therefore cannot suppress the error.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 5
(3,104 Views)
0 Kudos
Message 3 of 5
(3,084 Views)

Ok, I will incorporate this into my own teststand GUI.

 

Although it would be nice to have this option from the shipping version of teststand!

 

Thanks

0 Kudos
Message 4 of 5
(3,074 Views)

There is a simple workaround to use custom command line arguments even for TestStand sequence editor. Just use /enableFeatures argument and specify your own "features to enable" separated by a semicolon.


e.g.
"%TestStand64%\Bin\SeqEdit.exe" /runEntryPoint "Single Pass" "<sequence_path>\test.seq" /enableFeatures param1_name;"param1 value";"param2 name";param_value

 

TestStand ignores unrecognized features and doesn't show error popup.

0 Kudos
Message 5 of 5
(93 Views)