NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

add or edit Sequence Call step(s) dynamically in a sequence

Hello I have looked at the TestStand Example: SequenceBuilderTool
In the <TestStand>\Examples\SequenceBuilderTool Folder
It works great, but I cannot seem to be able to use this for a Sequence Call Step.
Any Solutions?
Thanks
BRI NI
0 Kudos
Message 1 of 6
(3,526 Views)

Hi Bri NI,

What seems to be your problem?

You will have to provide additional information such as the what Sequence to specify and whether its external or internal.

I may have a solution, but I'll have to go back through may archive.

There maybe a posted solution, regarding the Builder example, but its going back a few years.

Regards

Ray Farmer

Message Edited by Ray Farmer on 03-21-2007 07:35 AM

Regards
Ray Farmer
0 Kudos
Message 2 of 6
(3,521 Views)

Hi Ray,

Using something similiar to the SequenceBuilder.seq, I want to load Steps from a TemplateSequence.seq.

However, I would like to also load Sub-sequences.

The SequenceCall loads okay, but, if the Subsequence is in the same TemplateSequence file, the subsequence does not load.

I realize that when I Specify a Module(sequence) in the SequenceCall step from a seperate sequence file it works fine.

But I am wondering if there is a method that I can use to load a subsequence from the same reference sequence file that the Sequencecall step is in.

Any ideas? Wonder if it is clear enough.

Thanks

Please check out the example.

 

0 Kudos
Message 3 of 6
(3,514 Views)

Hi,

I think the way I resolved a solution, was by creating a custom step type based on the SequenceCall.

Anyway, I will check out your example and my old archive code and get back to you later on today.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 4 of 6
(3,513 Views)

Hi Brian,

I found some of my old code for my example, but unfortunately I haven't found the custom step types.

Anyway, had a look at your example posted.

I am I right in thinking you want the built sequence file to contain SequenceCall step which is linked to an internal sequence?

Assuming this is your requirement. I took the supplied SequenceBuilderTool example and modified it as such:

1. Added a SequenceCall step in MainSequence of the Template sequence file with its sub-sequence.

2. Added the sequence call step in the ini file.

3. Modified the "Build New Sequence" to insert the sub-sequence into the New Sequence File before inserting the steps into MainSequence.

Because I was only inserting one sequence, I kept it very simple.

First thing to do is get a reference to the Sequence from the Template Sequence File. Because I only had one sequence I used SequenceFile.GetSequenceByName. but if you have more than one you can get the number of sequences and use this as the max count and then use the GetSequenceByIndex, not using 0 as this will be MainSequence which will already be in your New Sequence File.

Next get a Clone of that Sequence using your new reference using PropertyObject.Clone.

Then finally, Insert the sequence into the new sequence file using Parameters.NewSequenceFileRef as the ActiveX Reference and call SequenceFile.InsertSequence (or SequenceFile.InsertSequenceByIndex).

Then I released the reference to the sub-sequence by setting the local variable used to Nothing.

The actual inserting of the SequenceCall step into MainSequence is handle by the existing code.

This produced a sequence file which contained the sub-sequence and the Step in MainSequence which called the sub-sequence.

I hope this helps.

Regards

Ray Farmer

Regards
Ray Farmer
Message 5 of 6
(3,494 Views)

Hey Ray,

Thankyou so much, it worked great. Now I wonder if adding steps to the subsequences will be easy as well.Smiley Happy

You've been a great help. Hope you can help me again in the near future.

'Brian

0 Kudos
Message 6 of 6
(3,483 Views)