Hello Tom,
Unfortunately, there is no method or property that returns the total number of steps including the ones inside subsequences. However, there is an API method call "Sequence.GetNumSteps" that returns the total number of steps in the given sequence reference.
In other words, you will have to recursively check every sequence inside your main sequence and call this method. In addition, it's not going to be accurate if your sub sequences contain loops and gotos. What I mean is that the total number of steps can be eventually different from the actual number of steps executed (ex.: you can execute the same step twice in a sequence with a loop).
Another idea would be modifying the process model used by your sequences so every sequence would post me
ssages regarding their actual progress, not the overall progress.
In order to get the step name you can use the API property Step.Name(). You can get the next and previous step name using the same function, just make sure you use the correct reference for the step you want to get the name. I'm attaching an example that shows how to get the next, previous step and also the total number of steps in a given main sequence (not including the sub sequences).
Roberto Piacentini
Applications Engineer
www.ni.com/ask