ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Run multiple sequences - teststand API c#

Solved!
Go to solution

Hi all,

 

I'm trying to run multiple sequences.

I have modified the exiting "TestStand UI with Native Control" DotNet code to accept run-time argument and run a sequence.

 

I want to pass multiple sequences file and run it in teststand. Anyone know how can one achieve this?

 

I'm using the CommandLine Parser to parse the run time arguments. 

 

0 Kudos
Message 1 of 3
(1,705 Views)

I want to create a Collection of SequenceFiles which are accepted via run-time arguments and will be executed.

For now to execute a single sequence file - below is my code:

 

this.axApplicationMgr.UserChanged += this.OnUserChanged;

 

private void OnUserChanged(object sender, NationalInstruments.TestStand.Interop.UI.Ax._ApplicationMgrEvents_UserChangedEvent e)
{
this.sequenceFile = this.axApplicationMgr.OpenSequenceFile(this.sequenceFilePath);
if (this.autoStart == true)
executeButton_Click(this, EventArgs.Empty);
}

 

private void executeButton_Click(object sender, EventArgs e)
{
if (axSequenceFileViewMgr.SequenceFile != null)
{
axSequenceFileViewMgr.GetCommand(CommandKinds.CommandKind_ExecutionEntryPoints_Set, 1).Execute(true);
}
else
{
MessageBox.Show("You must open a sequence file before you can execute.");
}
}

 

How can I make a List of sequence file which will be executed in the TestStand UI. PFA

0 Kudos
Message 2 of 3
(1,668 Views)
Solution
Accepted by topic author ngupta4

private List<string> sequenceFilePath;

 

private void CreateTestStandExecution(TestStandArguments args)
{
//sequenceList.Add(args.SequenceFilePath);
foreach (string filepath in args.SequenceFilePath)
{
this.sequenceFilePath.Add(filepath);
}
}

0 Kudos
Message 3 of 3
(1,647 Views)