Message 1 of 3
InputListBox while loop

Not applicable
04-20-2017
08:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm getting strange behavior from a while loop. I've got a multi-value list parameter called "Actions". While "04 - Exit" is not the selected parameter value, the rule opens an InputListBox which then runs a separate function, Fr_inp() based on the selection made.
If I run the rule and select "04 - Exit" the program ends as expected. However if I choose another action to perform, for example delete a component, after deleting the component the program returns to the while loop, brings up the InputListBox and now when I select "04 - Exit" the InputListBox reappears and I need to select it again to end the program. What am I missing?
Sub Main() Action= " " Action_list() Bay_list() While Action <> "04 - Exit" Action = InputListBox("Select Action to be made in the assembly", MultiValue.List("Action"), Action, Title := "Action", ListName := "Select Action to be made") MsgBox(Action) RuleParametersOutput() InventorVb.DocumentUpdate() Fr_inp() End While MsgBox(Action) iLogicVb.UpdateWhenDone = True ThisApplication.ActiveView.Fit End Sub