Inventor Weld Length Data Summation

Inventor Weld Length Data Summation

steveh3
Advisor Advisor
549 Views
2 Replies
Message 1 of 3

Inventor Weld Length Data Summation

steveh3
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
Accepted solutions (1)
550 Views
2 Replies
Replies (2)
Message 2 of 3

daltonNYAW9
Advocate
Advocate
Accepted solution

Sorry to do it to ya...

1 inch = 2.54 cm

0 Likes
Message 3 of 3

steveh3
Advisor
Advisor

LOL...

That gets me everytime! 🤣

Appreciate the help!

Steve Hilvers
Inventor Certified User / Vault Professional Influencer