11-20-2015 10:40 AM - edited 11-20-2015 10:41 AM
Hi !
I need to extend the For capabilities in my sequences.
So I buil a new step type (My_For) that I combined with the NI_Flow_For type. Then I added some properties to fulfill my requirements.
I did the same with the NI_Flow_End step type (My_End).
Both step defintions were created in MyTypes.ini.
In 'My_For' type definition, I set the 'BlockStartTypes' to empty string ("") ; and 'BlockEndType' to 'My_End'.
In 'My_End' type definition, I set the 'BlockStartTypes' to 'My_For' ; and 'BlockEndType' to empty string ("").
Then, when I insert a step 'My_For' in a sequence, it creates a 'NI_Flow_End' step but not a 'My_End' step !!!
If I delete the automatically created 'My_End' step, and drag'n drop a 'My_End' step below the 'My_For' it works !
So I'm guessing that the problems come from the OnNewStep substep which is doing something wrong, but I can't see what's not good in the properies I set...
Any idea ?
Solved! Go to Solution.
11-23-2015 10:03 AM
The OnNewStep custom substep is programmed to insert the "end" step. NOT to be smart enough to know the specified end block and insert that step. You need to write your own OnNewStep substep code that inserts the "my_end" end block step where you want it, and configure it properly (half of the issue is also that when you insert pairs of steps, you may need the start/end steps to be configured specially, not just inserted.
11-23-2015 10:33 AM
Hi Warren_scott,
Thank you for your answer !
It would have been nice form NI to build a 'clever' step or to give its source code as model.
What do you mean by 'especially configure' pairs of steps and not just insert them ? Do I need to do something particular after inserting 'my_end' step ?