Hi, I can't open the file because I work with inventor 2020.
Here I show you an example of how I would access the mass of solids. There must be many ways, but I hope this can serve you. Keep in mind that this method works with inventor internal units, and that is why I put kg in the unit.
I'll see if I can find an alternative route.
I hope this can help you
Dim doc As PartDocument = ThisDoc.Document
Dim oCD As PartComponentDefinition = doc.ComponentDefinition
Dim oDensity As Double= oCD.MassProperties.Mass / oCD.MassProperties.Volume
Dim oBody1 As SurfaceBody = oCD.SurfaceBodies(1)
Dim oBody2 As SurfaceBody = oCD.SurfaceBodies(2)
Dim oBody3 As SurfaceBody = oCD.SurfaceBodies(3)
iProperties.Value("Custom", "SolidMass1") = Round(oBody1.Volume(0.01) * oDensity, 3) & "Kg"
iProperties.Value("Custom", "SolidMass2") = Round(oBody2.Volume(0.01) * oDensity, 3) & "Kg"
iProperties.Value("Custom", "SolidMass3") = Round(oBody3.Volume(0.01) * oDensity, 3) & "Kg"
Please accept as solution and give likes if applicable.
I am attaching my Upwork profile for specific queries.
Sergio Daniel Suarez
Mechanical Designer
| Upwork Profile | LinkedIn