Message 1 of 5
Issues with Parts not updating when changed by ilogic in the Assembly (Inventor 2020)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am attempting to make a part that changes the dimensions it uses to determine its sized based on options in the assembly. Basically it is a curved part that i want to be able to have its length set by either its Angle, long point to long point dimension, or arc length.
This is currently my Assembly iLogic.
Parameter("BOT_D_PLT", "METHOD") = Wall_Length_Method
If Wall_Length_Method = "ARC LENGTH" Then
Parameter("BOT_D_PLT", "Wall_Arc_Length") = Wall_Arc_Length
End If
If Wall_Length_Method = "P2P" Then
Parameter("BOT_D_PLT", "Wall_P2P") = Wall_Length_Point_To_Poiint
End If
If Wall_Length_Method = "ANGLE" Then
Parameter("BOT_D_PLT", "Wall_Angle") = Wall_Angle
End If
Parameter("BOT_D_PLT", "Radius") = Outside_Radius
Parameter("BOT_D_PLT", "Width") = Wall_Thickness
Parameter("BOT_D_PLT", "Thickness") = 1.0 in
And this is currently my Part iLogic
Dim oDoc As PartDocument = ThisDoc.Document
Dim oCD As ComponentDefinition = oDoc.ComponentDefinition
Dim oSketch As PlanarSketch = oCD.Sketches.Item(1)
Dim oDim As DimensionConstraint
For Each oDim In oSketch.DimensionConstraints
If oDim.Parameter.Name = "P2P" Then oDim.Driven = True
If oDim.Parameter.Name = "ANGLE" Then oDim.Driven = True
If oDim.Parameter.Name = "ARC_LENGTH" Then oDim.Driven = True
Next
If Not METHOD = "" Then
If METHOD = "ARC LENGTH" Then
For Each oDim In oSketch.DimensionConstraints
If oDim.Parameter.Name = "P2P" Then oDim.Driven = True
If oDim.Parameter.Name = "ANGLE" Then oDim.Driven = True
If oDim.Parameter.Name = "ARC_LENGTH" Then oDim.Driven = False
Next
ARC_LENGTH = Wall_Arc_Length
End If
If METHOD = "P2P" Then
For Each oDim In oSketch.DimensionConstraints
If oDim.Parameter.Name = "ARC_LENGTH" Then oDim.Driven = True
If oDim.Parameter.Name = "ANGLE" Then oDim.Driven = True
If oDim.Parameter.Name = "P2P" Then oDim.Driven = False
Next
P2P = Wall_P2P
End If
If METHOD = "ANGLE" Then
For Each oDim In oSketch.DimensionConstraints
If oDim.Parameter.Name = "P2P" Then oDim.Driven = True
If oDim.Parameter.Name = "ARC_LENGTH" Then oDim.Driven = True
If oDim.Parameter.Name = "ANGLE" Then oDim.Driven = False
Next
End If
ANGLE = Wall_Angle
End If
InventorVb.DocumentUpdate()
iLogicVb.UpdateWhenDone = True
Both of these seem to work. But when i change the options in the assembly, the dimensions update their DRIVEN status, but do not update to new values. If i step into the part and run its rule everything updates as it should.
Any advice on how i can make this behave?