iLogic Rule not running when a part is dragged

frankstardelux
Enthusiast
Enthusiast

iLogic Rule not running when a part is dragged

frankstardelux
Enthusiast
Enthusiast

Hi All,

 

I have an assembly and some iLogic code. However, I'm struggling to get the Rule to run when I drag a part around. In a nutshell, I drag the part and an angle changes. The code measures the angle and should then set the angle of another part elsewhere in the assembly.

 

Sub Main
RuleParametersOutput()
InventorVb.DocumentUpdate()
Ang01 = Measure.Angle("BEAM - STR 06 - 10mm:1", "XZ Plane", "BEAM - STR 13 - 60mm:1" , "XZ Plane")
'Parameter("Ang02") = Ang01
d419 = Ang01 * 2

RuleParametersOutput()
InventorVb.DocumentUpdate()
End Sub

 

I'm completely new to iLogic, however, I have tried to diagnose the problem a bit. Under the Rule Options, the tickboxes for "Suppressed" and "Don't run automatically" are turned off. d419 is blue. Under Event Triggers, I have added to the Rule to:

Any Model Parameter Change

iProperty Change

Component Suppression Change

iPart or iAssembly Change Component.

 

After dragging the first part, if I run the rule manually, then the 2nd part updates correctly.

0 Likes
Reply
435 Views
1 Reply
Reply (1)

Curtis_Waguespack
Consultant
Consultant

Hi @frankstardelux 

 

I don't think there is currently a way to have a rule trigger by dragging a part, other than to have a "helper" sketch that "watches" a reference dimension... something like this:

 

iLogic_Helper Dim.PNG

 

Sub Main
oTrigger = Helper_Dimension
Ang01 = Measure.Angle("Cube:1", "XZ Plane", "Cube:2", "XZ Plane")

d419 = Ang01 * 2
InventorVb.DocumentUpdate()
End Sub

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

EESignature