iLogic doesn't run at once

iLogic doesn't run at once

Anonymous
Not applicable
432 Views
3 Replies
Message 1 of 4

iLogic doesn't run at once

Anonymous
Not applicable
At work, I create very huge assemblies and all the related product drawings. I have some knowledge and skills in iLogic, and I look forward to incorporate iLogic functionality in the whole process. I started creating the first sketch for the one of the assemblies - tank assembly. I need to control the location of the top of the tank above or below the origin depending on whether the elevation is positive or negative. The iLogic I created produce what I need - but not right away. I have to run the iLogic again and again to get the result. I spent a lot of time without success. Pl. help.
0 Likes
433 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable

Did you add event triggers to the rule? Or do you have a rule what does run where you can add at the end: run.rule("xxxx")?

0 Likes
Message 3 of 4

Anonymous
Not applicable
Thanks for trying to help me. Currently, no iTrigger used. I run it from the iLogic itself. ElevPN = RelativeElevation MessageBox.Show("Elevation: " & ElevPN, "Title") Dim oSketch As Sketch 'Dim oSketch As PlanarSketch Dim oDims As DimensionConstraints Dim oDim As DimensionConstraint oSketch = ThisDoc.Document.ComponentDefinition.Sketches.Item("Sketch1") oDims = oSketch.DimensionConstraints For Each oDim In oDims If oDim.Parameter.Name = "Elev_Up" Then oDim.Driven = True MessageBox.Show("Message Elev_Up: " & "Driven", "Title") Exit For End If Next For Each oDim In oDims If oDim.Parameter.Name = "Elev_Down" Then oDim.Driven = True MessageBox.Show("Message Elev_Down: " & "Driven", "Title") Exit For End If Next If ElevPN >= 0 Then MessageBox.Show("Message2-1: " & "Elevation - Positive", "Title") For Each oDim In oDims If oDim.Parameter.Name = "Elev_Up" Then oDim.Driven = False MessageBox.Show("Message Elev_Up: " & "Drive", "Title") Elev_Up = 0 Exit For End If Next End If InventorVb.DocumentUpdate() If ElevPN < 0 Then MessageBox.Show("Message2-2: " & "Elevation - Negative", "Title") For Each oDim In oDims If oDim.Parameter.Name = "Elev_Down" Then oDim.Driven = False MessageBox.Show("Message Elev_Down: " & "Drive", "Title") Elev_Down = 0 Exit For End If Next End If iLogicVb.UpdateWhenDone = True
0 Likes
Message 4 of 4

Anonymous
Not applicable
Try to run your rule through ilogic..

auto = iLogicVb.Automation
iLogicVb.RunRule("Rule1")
0 Likes