Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Solid Modelling (Mass calculation)

Status
Not open for further replies.

Guest
I am now trying to find out what is the mass of my solid modeling by command-(massprop)

I would like to ask how can i modify the material density in order to get the correct answer.


I have listed as follow:
========================================================
Command:
Command: _massprop
Select objects: 1 found

Select objects:

---------------- SOLIDS ----------------

Mass: 16875.0000
Volume: 16875.0000
Bounding box: X: 10.0000 -- 40.0000
Y: 10.0000 -- 40.0000
Z: 0.0000 -- 30.0000
Centroid: X: 21.5000
Y: 28.2500
Z: 14.0000
Moments of inertia: X: 19262812.5000
Y: 13592812.5000
Z: 23439375.0000
Products of inertia: XY: 10593281.2500
YZ: 6665625.0000
ZX: 4792500.0000
Radii of gyration: X: 33.7861
Y: 28.3813
Z: 37.2693
Principal moments and X-Y-Z directions about centroid:
I: 2889315.3877 along [0.7331 -0.6172 0.2858]
J: 1927050.5838 along [0.5944 0.3771 -0.7103]
K: 2328087.1535 along [0.3306 0.6905 0.6433]
 
Replies continue below

Recommended for you

Although not easy for the inexperienced;
Use automation control to change the property
 

Dear supermak;

I looked through all my references and it appears Acad 2000 does not allow to change the density, it is set at 1.0

Mechanical Desktop does allow the density to be changed based on the material.

I guess you have to look up the specific gravity of the material you require in machinerys handbook and multiply the density by that number. This calculation does not affect the centroid, products of inertia etc because these are all in length units only (inches, inches^3 or inches^4 or mm, mm^3 or mm^4)

Regards Adrian
 
Sub SteelWeight()

'From Acad, F-11 to VBA editor, Insert New Module, paste this code.
'Again from Acad->Tools->Macros->Run, pick this macro name

'This rudimentary example shows weight in a message box
' This example adds entities to a selection set by prompting the user
' to select entities to add.

' Create the selection set
Dim ssetObj As AcadSelectionSet
Set ssetObj = ThisDrawing.SelectionSets.Add("TEST_SSET")

' Add entities to a selection set by prompting user to select on the screen
ssetObj.SelectOnScreen

Debug.Print ssetObj.Item(0).Volume
Weightstring = "Steel Weight = " & ssetObj.Item(0).Volume * 7.8
'ThisDrawing.Utility.GetString (Weightstring,Weightstring)
MsgBox (Weightstring)
End Sub
 

Dear Tigrek;

Good Work !, That little program looks quite nice.

But I think we need to know exactly what units we are dealing with before we can calculate the weight.
i.e. cu. inch. x 0.282 lbs/cu.in.= weight for steel.

Your factor 7.8 is kg/cu. meter, for kg/cu. mm. you need 7.8 x 10 E-9

Display both results so we can be happy on both sides of the Atlantic !

Regards Adrian
 
Thanks Adrian.

I thought you might just replace the 7.8 with anything else. I just did not have density in other units in memory, that is all. if your drawing is in inches, just replace 7.8 with 0.282.


 
i have never tried to write VBA before, how can i open the editor and fit the provided coding in autocad

thx

From Acad, F-11 to VBA editor, Insert New Module, paste this code.
'Again from Acad->Tools->Macros->Run, pick this macro name
 
If F11 did not open the VBA editor, then:

Acad Menu->Tools->Macros->VBA Editor
VBAEditorMenu->Insert->Module

Then, copy/paste
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor