cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic rules trigger on Component Replace

iLogic rules trigger on Component Replace

iLogic doesn't get a notification of a parameter change in a newly placed or replacement assembly/part. It would be nice if Inventor recognized that parameters were changed inside these files and automatically trigger any rules that use them.

 

In the example assembly below, change the parameter named Part to "Part2" and the parameter named Hole to "No"

 

Part1.ipt is replaced by Part2.ipt, but the hole is still active in Part2.ipt and the rule that controls its activation state needs to be run to update it to match the specified options from the top level form.

2 Comments
DRoam
Mentor

This is a very interesting situation. I played around with your setup and sometimes I can get the "Hole Suppress" rule to run after changing both the Part and Hole from the master assembly, but when it runs, it's always running on the Part that's being replaced, not the one that's replacing it. (I used message boxes to test and determine this).

 

Even more strange is that after changing Part to "Part 2" and Hole to "No", if you go to Part 2, you'll see that the linked "hole" parameter has indeed change to "0", but for some reason this didn't trigger the Hole Suppress rule.

 

So for some reason, even though the "hole" parameter has changed in your replacer part, this didn't trigger "Hole Suppress" to run.

 

I even tried adding several "RuleParametersOutput()" and "RuleParametersOutput()" throughout each of your rules, hoping this would trigger Inventor to recognize that the "hole" parameter changed in the replacer part and therefore trigger the "Hole Suppress" rule, but it didn't make a difference.

 

So that's the root issue here, to me. That a change in a parameter (the linked "hole" Parameter in Part1 and Part2) is not triggering a rule which references that Parameter directly (in blue, not using Parameter("") )

 

I'm sure there's some quirk to how iLogic runs that's causing this, and maybe there's a way to tweak something to cause the "Hole Suppress" rule to be triggered as expected.

 

Have you posted this in the Customization forum to see if any of the iLogic experts there have any suggestions?

 

Anonymous
Not applicable

It is because of the sequence iLogic rules run in:

  1. the linked "hole" parameter is changed
  2. then the replacement part is brought in

So the replacement parts rule doesn't run, as it was not active (in the model) at the time the "hole" parameter value changed.

 

If the part was replaced first, then the "hole" parameter value changed, the replacement parts rule would trigger. However when you are replacing components in sub-assemblies, using iLogic rules that are driven by linked parameters, it's not practical to do this.

 

Yes I posted in the Inventor Customization forum:

https://forums.autodesk.com/t5/inventor-customization/ilogic-rule-triggers/m-p/6681917

 

I also spoke with Mike Deck at Autodesk about this issue and he said it was something that can maybe be improved in a future release. He gave me a work around bit of code that runs all the rules in the replacement document (after it is placed), but this takes long as it runs all the rules in that document & any sub-files, where it is only necessary to run the rules in any files whose linked parameters have changed.

 

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea