02-20-2020 01:58 PM
I am new to TestStand and I am trying to programmatically a SequenceCall into a step in C#. I am able to create new steps with:
Step step = engine.NewStep("Sequence Adapter", "SequenceCall");
And add them with:
seq.InsertStep(step, 0, StepGroups.StepGroup_Main);
I have a SequenceCallModule that I loaded my path into.
SequenceCallModule SMod = (SequenceCallModule)step.Module;
SMod.SequenceFilePath = path;
How do I associate this module with my step so when I insert my step the sequence call will be in my main sequence?
Let me know if you need any further information or clarification about my question. I am new to TestStand.
Solved! Go to Solution.
02-20-2020 03:45 PM
You should check out the shipping example on this topic:
%TestStandPublic64%\Examples\TestStand API\Building a Sequence Using API\DotNet
Hope this helps!
Trent
02-20-2020 06:49 PM
This was taken from an NI Week presentation:
Create SeqCallStep:
▪RunState.SequenceFile.GetSequenceByName("MainSequence").InsertStep(RunState.Engine.NewStep("","SequenceCall"),Locals.loopindex,StepGroup_Main)
Note: locals.loopindex is a variable added so they could loop on adding a lot of steps. It looks like you're almost there, you just need to add something like SequenceFile.GetSequenceByName("MainSequence")
so that it will go in the right place.
02-21-2020 09:48 AM
Thank you.
SequenceFile.GetSequenceByName("MainSequence")
Fixed it.