Mass of weldings

Mass of weldings

Skadborg.NTI
Advocate Advocate
970 Views
3 Replies
Message 1 of 4

Mass of weldings

Skadborg.NTI
Advocate
Advocate

I would like to get the mass of all weldings (actually the total sum is enough for me). Some how this information should be accessible, because the Weld command "Bead Report" writes a spreadsheet like this:

psp_0-1613853683575.png

But I can't find this information through the API. The weldings are found in WeldmentComponentDefinition.Welds, but I can't find mass information. I can't even find enough info to calculate them by my self.

Any body got a hint?

 

0 Likes
Accepted solutions (1)
971 Views
3 Replies
Replies (3)
Message 2 of 4

bhavik4244
Collaborator
Collaborator
Accepted solution
0 Likes
Message 3 of 4

Skadborg.NTI
Advocate
Advocate

Thanks a lot

0 Likes
Message 4 of 4

jonathan.victor
Advocate
Advocate

Hi, I was searching for the same thing, but didn't find anything <really> helpfull, so i figured it out! Below is a code that will show you the sum of the weld beads in you weldment assembly, with 3 decimal positions, in document units, change the mass unit symbol according to the document unit.

 

Dim oDoc As AssemblyDocument
oDoc = ThisDoc.Document
oOccs = oDoc.ComponentDefinition.Occurrences
WELD_MASS = Round(oOccs.ItemByName("_WeldBead:1").MassProperties.Mass, 3) & " Kg"
iProperties.Value("Summary", "Comments") = WELD_MASS
MessageBox.Show(WELD_MASS & vbNewLine & vbNewline & "Value copied to Assembly Comments", "There is the value"

 

Please, mark the answer as solution, if this helps

0 Likes