09-27-2022 05:49 AM
Hello everybody,
I am looking for a solution to create my on special label called "MyCommentBegin" as a Step Type. It should be able to contain the BlockStructure function of an "If-Statement" and as well the auto creation of an "End-Statement". The BlockStructure thing is easy. But to auto create a new step after this step is hard (like the If does when inserting the step in a sequence).
Thanks to the following thread I was able to create an "MyEnd" custom step. But only in a new sequence as this solution of the thread describes:
See the attachments of my "failed" solution so far... It wont auto create an "MyCommentEnd".
Someone has an idea?
Thanks
Solved! Go to Solution.
09-27-2022 02:17 PM
Attached is a sequence file that contains a custom step that might be what you want?
Let me know if you have any questions.
09-28-2022 12:34 AM
Unfortunately its not.
This kind of solution is not done by using the "End" Step like the "If" Step does it. But what I would like to have is a separate Custom Step which should act as an "End" Step. You used the "OnNewStepWithEndStep" out of the NIFlowControl.dll. But this will only insert the "End" Step of the Type NI_Flow_End.
Adrian
09-30-2022 10:19 AM
I got it to work but not sure why it's not putting the name of the End step in.
Check it out and let me now what you think? Maybe it will get you pointed in the right direction.
10-05-2022 01:06 AM
Strange... as soon as I perform the insert step on your CommentSection Step, the mouse symbol changes to "busy" and TestStand will crash 😄
So no solution for my I guess. Tried a lot with your solution but could not make it work. But many thanks for your try.
10-07-2022 01:33 PM
Not sure if you're still looking for a solution, but attached is a VI that we use to do just exactly what you describe. Use it as the module of an OnNewStep substep and pass it the sequence context and the name of your end step.
Also attached a sample sequence file with begin/end block style custom step that uses it.
Best,
-Scott
10-13-2022 03:16 AM
Oh wow, that is exactly what I was looking for. Thank you ;).
10-13-2022 07:31 AM
With your solution I was able to find out how to do it without LabView. All I had to do to make it work properly was to explicit name all those Custom Steps "OnNewStep" otherwise it wouldn't execute them properly. I dunno why, but it works fine now. Even adding multiple steps, renaming steps. The only downside is that all these Custom Steps are called "OnNewStep".
I wonder why I have to name it like that and if there are even more special namings to "script" such Substeps