
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello friends,
I am working on an assembly template that accesses part's parameters via iLogic. I have had everything working fine with my rules and forms changing the parameters and enabling and disabling parts depending on the choices. However, I was told to create a couple more parts since the original workflow was working. I made the new part, placed it into the assembly, but it was very large. All of my previous parts units were defaulted to Feet in the tools menu. This new part was set to Inches so it was odd to see it way larger than the parts created with feet.
I started using the measure tool and found out that the parts in Feet were actually very, very small. I went back to the part and saw that the user parameters were no longer linked to the model parameters. I re-linked them and then tried out the assembly forms again. The code worked, but it unlinked the part parameters again when i looked in the .ipt file. I believe the error is how i am accessing the parameters in the rule and that somehow breaks the link. Below is my code:
Sub Main Dim oAsmDoc As AssemblyDocument = ThisDoc.Document For i As Integer = 1 To oAsmDoc.ComponentDefinition.Occurrences.Count Dim oOcc As ComponentOccurrence = oAsmDoc.ComponentDefinition.Occurrences.Item(i) If oOcc.Name = "Pier_Part:1" Then oOcc.Definition.Parameters("Pier_Diameter").Value = a_PIER_DIAMETER oOcc.Definition.Parameters("Pier_Depth").Value = a_PIER_DEPTH oOcc.Definition.Parameters("Pier_Chamfer").Value = a_PIER_CHAMFER End If Next Parameter.UpdateAfterChange = True iLogicVb.UpdateWhenDone = True End Sub
Any help or advice is appreciated!! Thanks. Also, let me know if i need to share the entire project folder.
Solved! Go to Solution.