The attached immage shows how to determine the steptype name.
I've also attached a simple example that demonstrates how to filter step names. Let me know if this makes sense.
Is there a way to find out whether or not a sequence or step is main of the Main Sequence and in the Main block?
I should point out that it is probably safer to use the constants:
Use the following constants with this data type:
Returns the step group in which the step currently resides.
If the step is not currently inserted in a sequence, accessing this property returns an error.
Also, of note is that instead of Caller.StepGroup You could use RunState.Caller.Step.StepGroup
So do a compare like this RunState.Caller.StepGroup == StepGroup_Main