×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Solid Modelling (Mass calculation)

Solid Modelling (Mass calculation)

Solid Modelling (Mass calculation)

(OP)
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]

RE: Solid Modelling (Mass calculation)

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

RE: Solid Modelling (Mass calculation)


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

RE: Solid Modelling (Mass calculation)

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

RE: Solid Modelling (Mass calculation)


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

RE: Solid Modelling (Mass calculation)

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.


RE: Solid Modelling (Mass calculation)

(OP)
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

RE: Solid Modelling (Mass calculation)

If F11 did not open the VBA editor, then:

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

Then, copy/paste

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources