NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically enabling/disabling results using RunState.Execution

We run with our station options set to have results disabled for all sequences.  BUT, at one point in a sequence run from the tools menu (i.e., not using the process model), we want to temporarily turn on results recording, run a step or two to record results, and then turn result recording back off.
I am calling an ActiveX/Com step to enable results using  RunState.Execution DisableResults(false).  I then run various steps that should be recording results, but my Locals.ResultList remains empty.  Have also tried to calling  RunState.Execution AddExtraResult, but no luck.
My true goal is to be able to call the TestReport sequence of the SequentialModel.seq file which takes as its first parameter the "results container".  I want to be able to send a very select, small set of results that are generated from my sequence run from the tools menu.  I tried various ways of creating a "dummy" result list, but was unsuccessful doing that as well.
 
Any ideas?
0 Kudos
Message 1 of 2
(3,058 Views)

Barry,

For RunState.Execution DisableResults to work, The Engine and | or  Sequence must also be False depending on what setting you have set to disable.

So in your case you need to set IEngine.DisableResults(False). You dont really need to call RunState.Execution DisableResults(False), use this if you what to switch on | off recording of selective steps rather than all steps in a Sequence.

Use Sequence.DisableResults to disable all steps in a Sequence.

Hope this helps

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 2
(3,038 Views)