NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Check error in sequence file before execution - teststand api c#

Hi all,

 

I've modified the "TestStand UI with Native Control" example to automatically execute a sequence file but I would like to check the sequence file for any errors before it begins it's execution and throw an appropriate error.

 

How can I do achieve this?

 

Thanks,

ngupta4

0 Kudos
Message 1 of 2
(683 Views)

hi all,

 

I have done the below edits to the 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.");
}
}

 

I'm want to "analyze" the sequence file before the execute. How can i do that?

0 Kudos
Message 2 of 2
(638 Views)