iLogic Boolean Parameter Not Updating Across Rules in Autodesk Inventor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have an assembly file with a Boolean parameter that should toggle between True and False based on conditions set in the "Update_Param" rule. This rule is executed by another rule called "FIRE_ALL_RULES".
The issue is that when "Update_Param" updates the Boolean parameter, the change appears to be applied. However, when I access the same parameter in "FIRE_ALL_RULES" after running "Update_Param", the updated value is not reflected.
To replicate this, I created a dummy file with two rules, but I’m facing the same issue.
Below is my code snippet for reference.
FIRE_ALL_RULES
MessageBox.Show("ABC BEFORE: " & ABC) iLogicVb.RunRule("RULE_RUNNER") RuleParametersOutput() iLogicVb.DocumentUpdate() MessageBox.Show("ABC AFTER: " & ABC)
RULE_RUNNER
Dim a As Integer = 1 oDoc = ThisDoc.Document MessageBox.Show("INSDIE: " & iLogicVb.RuleName) ABC = False MessageBox.Show("ABC IS: " & ABC) If a <> 0 ABC = True RuleParametersOutput() iLogicVb.UpdateWhenDone = True End If MessageBox.Show("ABC IS: " & ABC)
I just run "FIRE_ALL_RULES", and it gives me this output in the same order (Parameter ABC is initially set to "FALSE");
Now, ABC_AFTER Should give a "True" value instead of "False".
Any insights or suggestions to resolve this issue would be highly appreciated. Thank you in advance for your help! 🙌
Best Regards,
Muddassir