NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Can GetCommand().Execute(true) block?

Solved!
Go to solution

My code tries to execute a test via the following C# code:

 

    Datetime startTime = DateTime.Now;

    this.axSequenceFileViewMgr.GetCommand(CommandKinds.CommandKind_ExecutionEntryPoints_Set, 1).Execute(true);

    Datetime endTime = DateTime.Now;

 

However, the call to Execute() doesn't block.  I assume it spawns a new thread or process and returns.

 

Is there a way to configure TestStand so this call will block until the execution completes?

0 Kudos
Message 1 of 2
(2,747 Views)
Solution
Accepted by topic author tlaford

No, it launches a new thread. It would be very bad if it did block, because your GUI thread needs to process Windows and TestStand events.

 

Instead, use both the StartExecution and EndExecution events on the ApplicationMgr.

 

 

0 Kudos
Message 2 of 2
(2,746 Views)