NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

teststand api to read sequences in a subsequence

I would like to read the subsequence names in a subsequence file using the API from C# 2008.

 

My top level sequence looks like this:

MainSequence

GroupSequence1

GroupSequence2

GroupSequence3

 ...

 

In the subsequence GroupSequence(n) I have the following sequences:

MainSequence

TestSequence1

TestSequence2

TestSequence3

...

 

I am able to get the top-level sequence's subsequence names by:

 

public void ReadSequenceNames(SequenceContext seqContext)

{

     for (int i = 0; i < seqContext.SequenceFile.NumSequences; i++)

    {

        string subSequenceName = thisSeqContext.SequenceFile.GetSequence(i).Name;

    }

 

This code returns "MainSequence", "GroupSequence1", "GroupSequence2", "GroupSequence3".

 

Now I want to find the names of the subsequences in "GroupSequence1", "GroupSequence2", "GroupSequence3", etc.

 

I would expect to find "MainSequence", "TestSequence1", "TestSequence2", "TestSequence3", etc. but my attempts to move down in the sequence hierarchy haven't worked.

 

0 Kudos
Message 1 of 2
(2,893 Views)

Hi,

 

These sub-sequence  dont reside in the Top level sequence file, therefore, you will have to work your way through the sequences and at every SequenceCall get the path to the sequence file so that you can then load the sequence file to obtain the sequences.

 

There are a number of API calls you could use but it will depends on how this rountine is run.

 

Regards

Ray Farmer

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