NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

how to append the dynamically created sequence in to the main sequence

i have created a sequence dynamically using c# with myEngine.NewSequence(). I  am loading this sequence into a sequence file created using myEngine.NewSequenceFile(). every sequence file has a main sequence by default. Now I need to append the created sequence in to the main sequence. can you please help me to solve this issue?
0 Kudos
Message 1 of 4
(3,327 Views)
1. Sequence seqMain = seqFile.GetSequenceByName("MainSequence"); 

2. Your stuff that creates a SequenceStuff e.g. "Hello"

3. Step stepSeqCall = engine.NewStep(AdapterKeyNames.SequenceAdapterKeyName, "SequenceCall");

4.stepSeqCall.Name = "HELLO" or sequenceStuff.Name;

5. objModule.UseCurrentFile = true;

6.objModule.SequenceName = stepSeqCall.Name ;

7.seqMain.InsertStep(stepSeqCall, nSeq, StepGroups.StepGroup_Main);

 

Greetings from Germany

 

Juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 2 of 4
(3,306 Views)
I have tried this already. But it is again 2 main sequences in the sequence file as shown in the attached screenshots.Is there any possibility to avoid that?
Download All
0 Kudos
Message 3 of 4
(3,303 Views)

Hi

 

Calling engine.NewSequenceFile();

creates a file where a empty MainSequnence is persent. So you not need to create it once more.

To get the SeqenceObject for inserting your steps in MainSequence. Use  

GetSequenceByName("MainSequence") for doing this.

 

Juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 4 of 4
(3,298 Views)