NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

how to get the step index of a step...?

Solved!
Go to solution

Hi...

I want to set the RunState.NextStepIndex. I do not want to hardcode the value. I want to dynamically get the stepIndex of a particular step so that even if the steps are moved still i go to the same step. How can i get the stepIndex of any step...? which method should i use...?

0 Kudos
Message 1 of 3
(3,709 Views)
Solution
Accepted by lordsathish

Once you have a reference to the sequence then you can call GetStepIndex.

 

GetStepIndex Method

Syntax

Sequence.GetStepIndex ( nameOfStep, stepGroupParam)

Return Value

long

Returns the index of the step with the name that matches the name you specify. Returns -1 if no such step exists.

Purpose

Returns the index of the step with the name that matches the name you specify.

Parameters

nameOfStep As String

[In] The name of the step you want the index of. If there is more than one step using the same name in the step group, the method returns the index of the first step with that name. Name comparison is case-insensitive. You can also pass a unique step Id.

stepGroupParam As StepGroups

[In] Specifies a particular step group.

 

 

 

Hope that helpls,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 2 of 3
(3,697 Views)

Thank You...

It worked...Smiley Happy 

0 Kudos
Message 3 of 3
(3,665 Views)