- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Gang...
Trying to create some ilogic to sum the total of all weld lengths in a weldt.
I have the logic running....but I am questioning the accuracy.
Here's the logic....
Dim oDoc As AssemblyDocument oDoc = ThisDoc.Document Dim oComdef As WeldmentComponentDefinition oComdef = oDoc.ComponentDefinition Parameter("Weld_Length_Sum") = 0 Dim oWeldBead As WeldBead Dim oWeld As Weld For Each oWeld In oComdef.Welds If oWeld.Type = ObjectTypeEnum.kWeldBeadObject Then oWeldBead = oWeld Logger.Info("some info about the stuff that just happened...") Logger.Info(oWeldBead.BeadLength) MessageBox.Show((oWeldBead.BeadLength), "weld") Parameter("Weld_Length_Sum") = Parameter("Weld_Length_Sum") + (oWeldBead.BeadLength) End If Next MessageBox.Show(Parameter("Weld_Length_Sum"), "Sum of All Welds")
I get a grand total of 76.48 inches....but if I export the weld bead table....I get a different summation.
The weld bead table is correct, iLogic is wrong.
See the attached spreadsheet for the comparison.
Do I have the correct variable for the bead length?
Thanks in advance,
Steve Hilvers
Inventor Certified User / Vault Professional Influencer
Inventor Certified User / Vault Professional Influencer
Solved! Go to Solution.
Link copied