NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Get step names from Outside running Sequence

Solved!
Go to solution

Hi, 

 

I have been trying to get the step names from a Sequence, but thru a different sequence.

 

I know How to get them from the running sequence:

 

RunState.Sequence.Setup[Locals.Counter].Name

 

For this case Im getting the names from the Setup group, using a counter to iterate from all the avaliable steps in the Setup group.

 

But I'm still unable to get it from and outside Sequence. I have tried the following

 

Locals.SEQREF= RunState.Engine.GetSequenceFileEx(Parameters.SEQUENCENAME+".seq", GetSeqFile_FindFile, ConflictHandler_Error)

 

Locals.SEQREF.AsSequenceFile.GetSequence(Locals.Counter).Name

 

but with this approach I got all the Sequence Names available in the Sequences 

LuisFuentes_0-1626758034073.png

 

and I just want to get the names called in the Setup, Main and Cleanup groups

 

in advanced thanks for the support

 

 

 

 

0 Kudos
Message 1 of 3
(248 Views)
Solution
Accepted by topic author LuisFuentes

The Locals.SEQREF.AsSequenceFile.GetSequence(Locals.Counter).Name will indeed give you the names of  sequences in your file. But you want to get the names of steps in Setup,Main,cleanup stepgroups of some particular sequence.

 

This is what you need:

ThisContext.SequenceFile.GetSequenceByName("Name of your sequence").GetStep(Locals.SomeCounter,StepGroup_Setup).Name

 

 

Roman

Message 2 of 3
(197 Views)

Thank You!!!

0 Kudos
Message 3 of 3
(160 Views)