Form Run Rule ilogic Not Running

Form Run Rule ilogic Not Running

munderwood4GRE6
Enthusiast Enthusiast
758 Views
7 Replies
Message 1 of 8

Form Run Rule ilogic Not Running

munderwood4GRE6
Enthusiast
Enthusiast

I have a global form that is using a button/iLogic rule in the assembly to close.

munderwood4GRE6_0-1644432431698.png

I have a If statement in the rule that evaluates if user inputs matches a parameter in the assembly.

The if statement says that if they don't match to show an error message box and then show the global form again.

This works the first time after closing the form. 

As expected, the error shows and the form comes right back up to fix. After closing it the second time though the rule doesn't run at all. The form just closes.

 

Any help understanding this would be great!

 

Regards

 

0 Likes
759 Views
7 Replies
Replies (7)
Message 2 of 8

WCrihfield
Mentor
Mentor

When using global iLogic forms, you will pretty much always need to use 'apply' before any changes made in the form will effect the document.  So, you will most likely want to change that setting of the rule button to either 'Apply and then Run Rule' or 'Apply and then Close and then Run Rule'.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 8

munderwood4GRE6
Enthusiast
Enthusiast
I've tried this and the rule still only runs once. Any other thoughts or suggestions?
0 Likes
Message 4 of 8

WCrihfield
Mentor
Mentor

Does it look like its working on something or thinking when things don't work right?  Sometimes the dialog displayed by a rule gets covered or hidden behind something, and it is still waiting for you to click OK or something on that iLogic rule dialog.  I've encountered that a couple of times.  I had to click on the Inventor application icon at the bottom of the screen to 'activate' it and make it come to the front, which then showed the little dialog that I did not see.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 5 of 8

munderwood4GRE6
Enthusiast
Enthusiast
I just checked. That is not the issue. It just simply doesn't run the rule the second time it is closed.
0 Likes
Message 6 of 8

WCrihfield
Mentor
Mentor

Is it possible that you may need to update or rebuild the document at the start of the rule, so that certain changes take effect, before checking values?  I've encountered that a few times before too, depending on the situation.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 7 of 8

munderwood4GRE6
Enthusiast
Enthusiast
I have a param that is set to a length value lets call param1 for simplicity that displays in the form.
In the form I have a few inputs, lets call them param2 and param3, for end users that fill out length value parameters in the assembly.
Once the form button is clicked, either apply, close, run or close, run the rule evaluates the params by the following:
If param1 <> param2 + param3
Messagebox.ShowGlobal("the lengths don't match param1","error")
iLogicForm.ShowGlobal("Form Name")
Else
End If
This works exactly as expected the first time you hit the button and it runs the rule. If they sum to = param1, nothing. The form just closes. If they don't, form one opens again. If I hit the button again the form just closes. The rule doesn't run.
0 Likes
Message 8 of 8

hansDPQMN
Enthusiast
Enthusiast

you can calculate the 3rd length instead of filling the form

 

0 Likes