iLogic rule not firing on linked parameter change

iLogic rule not firing on linked parameter change

Anonymous
Not applicable
766 Views
4 Replies
Message 1 of 5

iLogic rule not firing on linked parameter change

Anonymous
Not applicable

I'm experiencing some strange behavior that I've never had a problem with on previous Inventor versions.

 

I'm using a multi-body base component and driving its parameters from a high level assembly. I also derive/link the parameters of the base component into parts and assemblies for use inside iLogic rules within those files.

 

For the most part, a change to a parameter in the base component will trigger any rules in parts and assemblies where the parameter is linked. However I have a few instances where this doesn't happen.

 

For testing purposes, in Assembly2.iam and Assembly3.iam I have this rule:

msgbox(FREE_AIRLINE_DIA)

 

In both of those assemblies the base component parameter is linked through the Parameters dialog as shown below

linked assembly parameter.jpg 

 

 

 

 

 

 

 

From my high level assembly I use the iLogic form to change the value of FREE_AIRLINE_DIA in the base component.

To do this I use this rule in my high level assembly:

Parameter(“BaseComponent.ipt”, "FREE_AIRLINE_DIA") = FREE_AIRLINE_DIA

 The parameter successfully changes in my base component and naturally in my two assemblies also, but only the rule in Assembly2.iam gets triggered Smiley Mad Smiley Frustrated

 

Any suggestions as to why this is happening?

 

Both rule options are set to run automatically.

 

Something interesting to note is, if I manually go into the base component and change the parameter, rather than driving it from my high-level assembly rule, when I open the assembly that's not working, there's a pending Inventor update (due to the linked parameter value change) and once I click it the rule will run. So the rule is running automatically on the parameter change, just not when I do it using the way I want to from the high level assembly iLogic form.

 

I also experience the same issue in a part file, with a different parameter, but have managed to work around it by assigning the rule to the Part Geometry Change event trigger.

 

As I mentioned before, I've used this methodology many times in the past and this is the first time I've had this problem. Its frustrating the life out of me that I can't get down to the bottom of the issue. Not ideal when your under pressure to get work released Smiley Indifferent

 

Any help would be much appreciated!

0 Likes
767 Views
4 Replies
Replies (4)
Message 2 of 5

LukeDavenport
Collaborator
Collaborator

Hi Craig,

You'll probably have to attach a minimally reproducible example assembly for someone to test.

Most of the time document update statements can solve this kind of problem. As I'm sure you're aware, iLogic rules by default only trigger themselves when any parameter coloured blue in the rule changes.

What is the difference between Assembly2 and Assembly3?

Luke

0 Likes
Message 3 of 5

HermJan.Otterman
Advisor
Advisor

what I'm seeing in my work is that as soon as I use:

parameter("Param") = SomeValue

that the rule is not triggered...

what I do to trigger the rule is:

SomeVaraible = SomeValue

so before SomeVariable is not parameter("") , and than it works. it is the same as :

iTrigger = SomeValue   ... the iLogic way, but iTrigger is just a variable

If this answers your question then please select "Accept as Solution"
Kudo's are also appreciated Smiley Wink

Succes on your project, and have a nice day

Herm Jan


0 Likes
Message 4 of 5

LukeDavenport
Collaborator
Collaborator

Yes agreed HermJan - you have to refer to the parameter directly (so that it is coloured blue) for it to become an auto-trigger for the containing rule.

0 Likes
Message 5 of 5

Anonymous
Not applicable

Hi @LukeDavenport

 

Thanks for your time. I reproduced a simplified model and it solved the issue, so I've been working backwards to identify whats causing the problem.

 

What I've found is, if I remove these two lines from the end of the rule in the high level assembly then the sub-assembly rules will trigger just fine. 

RuleParametersOutput()
InventorVb.DocumentUpdate()

 

But in my simplified model, I've got these two lines at the end and it works fine also so another piece of code somewhere is causing the issue. 

 

In the simplified version of my high level assembly, the rule looks like this:

Dim oDoc As AssemblyDocument = ThisDoc.Document

Parameter("base component.ipt", "CONE_ANGLE") = CONE_ANGLE
Parameter("base component.ipt", "OUTLET_DIA") = OUTLET_DIA
Parameter("base component.ipt", "HOPPER_BODY_WELD_SEAM_ANGLE") = HOPPER_BODY_WELD_SEAM_ANGLE
Parameter("base component.ipt", "CONE_WELD_SEAM_ANGLE") = CONE_WELD_SEAM_ANGLE
Parameter("base component.ipt", "FREE_AIRLINE_POSITION") = FREE_AIRLINE_POSITION
Parameter("base component.ipt", "FREE_AIRLINE_DIA") = FREE_AIRLINE_DIA
Parameter("base component.ipt", "FREE_AIRLINE_POSITION") = FREE_AIRLINE_POSITION
Parameter("base component.ipt", "LID_TOP_WELD_SEAM_ANGLE") = LID_TOP_WELD_SEAM_ANGLE
Parameter("base component.ipt", "BODY_DIAMETER") = BODY_DIAMETER
Parameter("base component.ipt", "FREE_AIRLINE_ANGLE") = FREE_AIRLINE_ANGLE

RuleParametersOutput()
InventorVb.DocumentUpdate()

 In the more complicated version, there's tons of conditional statements & other parameters wrapped around all of this.

Sorry I cant share the full model, but I'll post back with any findings.

0 Likes