02-13-2025 03:23 AM
Hello,
I'm currently working with a sequence that contains multiple steps with the same name. I've been using the GetStepByName
command to retrieve the first step it finds with a given name in my sequence. However, I need to insert the same values into all steps that share this name. Is there a method to retrieve a list of all steps with the same name within a sequence and apply changes to each of them programmatically?
Any guidance or code snippets that could help achieve this would be greatly appreciated.
Thank you!
02-13-2025 05:00 AM
That's why unique step names are generally recommended...
If not, you have to loop through all steps and check if the step name matches what you are searching for.
02-13-2025 05:03 AM
ok , so what is the command i need to do in c# to reach all of the steps in the sequence and change them?
02-13-2025 05:56 AM
Once you have obtained the SequenceReference (Sequence)
Sequence.GetNumSteps()
to give you the number of Steps in the StepGroup (Setup,Main, Cleanup)
Then you loop over all steps
Sequence.GetStep(index, stepGroup).AsPropertyObject.Name
If you have a match, you can work on this the step