02-21-2011 01:30 PM
As a first step in creating a custom For-loop step type, I copied the standard for-loop from NI_Flow_Control.ini to MyTypes.ini. I renamed the step, changed the Default Step Name expression to a string constant, and did the same with the Item Name Expression. That's it- no other changes. However, the loop doesn't loop. I've compared it wit the standard "For" step with multiple identical loop conditions. The standard For step runs as expected. My not-yet-very-custom step runs exactly once, no matter what I do. What am I missing? Thanks!
Solved! Go to Solution.
02-21-2011 02:55 PM
The flow control steps are special. If you examine them, you'll see there are no substeps to define their runtime behavior. The runtime behavior is built-in to the engine as an optimization. The engine applies the runtime behavior based on the step type name. If you copy a NI flow control step and want it to continue to have its default runtime behavior, make sure your step type name begins with the original NI name. For example rename "NI_Flow_For" to "NI_Flow_For_MySpecialVersion"
02-21-2011 03:19 PM
Great- thanks! I can still use anything name I want in the menu expression, so it's transparent to a developer.
02-21-2011 04:26 PM
I've modified the with an edit substep which sets up the looping parameters. However, there are two additional issues:
1) I've added a post substep that populates the "Report Text" field. However, when my report is generated, the report contains nothing at all with regard to this looping step
2) I would like to hide the default loop condition editor in the step settings pane, as I only want my own configuration routine to be available.
Any ideas? Thanks so much for your help!
02-21-2011 05:03 PM
I'm not sure from your description what is happening in 1, but for 2, go to your step type in the types view and expand it to NI_Data.EditPanels. Click the Resize Array button for EditPanels and checkmark Empty. Also checkmark the option to apply the bounds changes to all loaded instances (and make sure any files with your step type that you want to be affected are already loaded).
02-21-2011 05:08 PM
For 1) the problem might be that the default for your step type is to not record results. Make sure that the record results checkbox is checked for your step type and step instances.
Hope this helps,
-Doug