NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Step names in MainSequence through TestStand only

Solved!
Go to solution

Hello,

 

I have seen a lot of threads already asking similar question, but all of them are using external modules (VIs, C#, etc.)

 

I am looking for a way to get step names using only local (TestStand) action steps, for example ActiveX modules. For now it would be enough to get step names only in MainSequence callback.

 

From what I figured out so far the logic should be like this:

1. Get sequenceFile object

2. Get MainSequenceObject

3. Read property -> Number of steps

4. Get reference to all steps

5. Loop through object to read Name property.

0 Kudos
Message 1 of 4
(133 Views)
Solution
Accepted by topic author luklem

Found a way, but ran into another problem... 

 

Solution:

1. Load sequence file with Engine.GetSequenceFileEx

2. Get MainSequence reference with SequenceFile.GetSequenceByName

3. Get total num of steps with Sequence.GetNumSteps

4. Get reference to each step with Sequence.GetStep & get it's property with Step.Name

5. Unload Step & Sequence modules

6. Release sequence file with Engine.ReleaseSequenceFileEx

 

Error:

My release sequence file functions does not work for whatever reason (no errors occur, but bool return value is False), hence I can not unload the file. Are there any other steps that I am missing?

0 Kudos
Message 2 of 4
(121 Views)

I don't remember, that I have ever executed to what you refer to Step 5.) in this sceanrio

 

ReleaseSequenceFileEx is crucial as you've already learned

0 Kudos
Message 3 of 4
(103 Views)

Would you share your final solution with the community?

0 Kudos
Message 4 of 4
(76 Views)