NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Loop index of interactive execution

Hi,

Is there a way to get the loop index of an interactive execution ?

Bruno
0 Kudos
Message 1 of 7
(3,318 Views)

Hi bruno,

You can find the loop index using the lookup string of "RunState.LoopIndex".

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 7
(3,312 Views)
Hi Ray,

TestStand updates "RunState.LoopIndex" for a "classic" loop.

But this property is not updated when I use the menu "Loop on selected steps using...".

Bruno
0 Kudos
Message 3 of 7
(3,307 Views)

Hi bruno,

Use TS API  InteractiveArgs.LoopCount() call to return this property. You will have to obtain an InteractiveArgs reference.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 4 of 7
(3,301 Views)
Ray,

Thanks for your answer.

Ok. I didn't see the LoopCount property of the InteractiveArgs object...
And you're right I will have to obtain an InteractiveArgs reference...

But I don't know how to get this reference.

I saw that I can create an InteractiveArgs object which can be passed to the NewExecution method of the
Engine object.
But I don't want to create the object. I want to get the object that is created when I run "Loop on selected steps using..." (Sequence Editor, engine version 3.1f1).

In fact I try to know if it is possible to add the loop index of the interactive execution to the TestStand report. (User request)

Bruno
0 Kudos
Message 5 of 7
(3,292 Views)

Bruno,

After a little investigation...

I got a feeling that this loop count is only available to the Sequence Editor internal workings or the Operator Interface. If you are using the OI then this will be not problem as the code is available to you to modify.

The Sequence Editor is obviously doing the same thing as the OI but you haven't got access to its code to modify it. Its the value you enter on the loop dialog before the interactive execution starts.

It doesn't look like it stores this value as a property that you can access.

I may be wrong and I am just not seeing the obvious.

Regards

Ray Farmer

Regards
Ray Farmer
Message 6 of 7
(3,277 Views)
Ray,

It seems to be difficult to access this property...
I don't find an easy way to do this in the OI.

I can't access an existing property directly.
So I think I should replace the default command LoopOnSelectedStep and pass my own InteractiveArgs object.

But how to replace this command ?

Bruno
0 Kudos
Message 7 of 7
(3,252 Views)