Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Parameter.UpdateAfterChange = True If WithMeter = True Then i = 0 Do Until (Parameter("BoxWidthFinal") > 550) Parameter("Offset_BoxWidth") = Parameter("Offset_BoxWidth") + 5 i = i + 1 If i = 50 Then MessageBox.Show("Iterations exceeded expected value. Exiting loop.", "Warning") Exit Do End If Loop 'iLogicVb.UpdateWhenDone = True Else Parameter("Offset_BoxWidth") = 0.001 End If iLogicVb.UpdateWhenDone = True
Please help I'm having difficulty making this loop work. No matter what I do the loop always ends at i = 50 even when the parameter "BoxWidthFinal" should have already gone past 550.
Btw, parameter BoxWidthFinal is defined as (BoxWidthfinal = BoxWidth + Offset_BoxWidth) in a separate rule.
My guess is that the loop condition isn't updating after each iteration of the loop.
Also I have a similarly constructed loop within the same .ipt file in another rule, which adjusts another parameter (BoxDepth). That seems to work but this one does not.
Solved! Go to Solution.