How can you set up cascading external iLogic rules? I have an external rule that I would like to run in each level of an assembly with multiple levels of sub-assemblies, but Inventor will only trigger it once.
I basically have two rules:
- An Internal iLogic Rule called "Process" within each file. It runs a few routines and then executes the external rule "Casing" at the end.
- An External iLogic Rule called "Casing." It runs a few routines then scans through the subcomponents in the assembly. And if any of them are ".iam" files then it runs their internal "Process" Rule at the very end.
At least that is how it is intended to work. The subcomponents and number of levels in this assembly change from time to time. The idea was that, regardless of which levels or components were present, it would flush the changes from level to level, running the routines until it got to the bottom.
Here's the problem. Inventor will only trigger the external rule "Casing" once. I can trigger it manually at each level, but when the code pretends to trigger it, it doesn't run. Even though it is called more than once by the "Process" rules in the different parts, it will not run it again.
Here's what happens:
Level 1 of the assembly:
- "Process" rule runs internally within Assembly1 and calls the external rule "Casing."
- "Casing" rule runs externally and triggers the internal "Process" rules in the subassemblies at the very end.
Level 2 of the assembly:
- "Process" rule runs within each Sub-Assembly1a and calls the external rule "Casing."
- "Casing" does not run but also doesn't give any error messages. It simply does nothing
Here is why I think it happens
Level 1 of the assembly:
- "Process" rule runs internally, then calls the external rule "Casing" at the very end. However, it does not execute 'End Sub' until "Casing" is done running.
- "Casing" rule runs and triggers the internal "Process" rules in subassemblies at the very end. However, it does not execute 'End Sub' until the "Process" rules in all of these subcomponents are done running.
Level 2 of the assembly:
- "Process" rule runs within each Sub-Assembly and calls the external rule "Casing."
- However, "Casing" does not run because Inventor sees it as still running from the level above.
Why doesn't Inventor trigger a fresh version of this external rule each time I call it? Is there any way to work around this?
Thanks,
Steve