Inventor Weld Length Data Summation

steveh4
Advisor
Advisor

Inventor Weld Length Data Summation

steveh4
Advisor
Advisor

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
Reply
Accepted solutions (1)
94 Views
2 Replies
Replies (2)

daltonNYAW9
Advocate
Advocate
Accepted solution

Sorry to do it to ya...

1 inch = 2.54 cm

0 Likes

steveh4
Advisor
Advisor

LOL...

That gets me everytime! 🤣

Appreciate the help!

Steve Hilvers
Inventor Certified User / Vault Professional Influencer