eric_monceaux Posted May 14, 2008 Share Posted May 14, 2008 I am trying to stream line a modeling process in Mechanical 2008. I am creating fireplaces (to be made into Cast Stone), and I was instructed to give the weights of individual pieces. My process currently is to construct the 3D solid, then a MASSPROP to get the cubic inch measurement. After that, using a construction calculator, convert to cubic feet, and then multiply the cu.ft. by the density value (140) to get the final weight. i.e.--------------> Step 1: 4752 cu. in. (MASSPROP value) / 1728 (convert to cu. ft.) = 2.75 cu. ft. Step 2: 2.75 cu.ft. x 140 (cast stone density) = 385 LBS. Its not a huge deal, but a headache that I would like to remedy. Any thoughts? Quote Link to comment Share on other sites More sharing options...
Hoozin Posted May 14, 2008 Share Posted May 14, 2008 Little lost on your question, but I think your asking for a simple command to get the weight of the piece from a single command versus doing the calculation yourself? I don't know of a command to do that for you, I suspect there's a thousand and one lisps for it though. I'm also not at all familiar with the vertical desktop applications beyond the ACAD base, so there may be something in there to do it for you too. Quote Link to comment Share on other sites More sharing options...
fuccaro Posted May 14, 2008 Share Posted May 14, 2008 I don't know of a command to do that for you, I suspect there's a thousand and one lisps for it though.No, Hoozin! There are one-thausand-and-TWO. Look here: (defun SumVolume ( / getvolume volume ss i ) (defun getvolume ( object / area ) (vl-catch-all-apply '(lambda () (setq volume (vla-get-volume object ) ) ) ) (if volume volume 0.0) ) (if (setq volume 0.0 ss (ssget)) (repeat (setq i (sslength ss)) (setq volume (+ volume (getvolume (vlax-ename->vla-object (ssname ss (setq i (1- i)) ) ) ) ) ) ) ) (if volume volume 0.0) (princ (strcat "\nMAT. DENS. Kg \n--------------------" "\n" "OL (7.85): " (rtos (* volume 785e-) "\n" "Cu (8.96): " (rtos (* volume 896e-) "\n" "Al (2.70): " (rtos (* volume 270e-) "\n" "CuSn (8.15): " (rtos (* volume 815e-) "\n" "CuZn (8.35): " (rtos (* volume 835e-) "\n--------------------\n" ) ) (textscr) (princ) ) Eric_monceaux This uses mm³ and I hard coded the densities for some metals. Just give it a quick try. If you like it, edit the list at the end. Quote Link to comment Share on other sites More sharing options...
eric_monceaux Posted May 14, 2008 Author Share Posted May 14, 2008 Thanks for the quick response fuccaro. I am a little rusty as far as lisps are concerned, so I need just a little more info. I created the lisp with your coding, but I am trying to figure out how to type it at the CMD prompt. Also, you said that it is in MM3. Is there a way to convert that to CuFt? Quote Link to comment Share on other sites More sharing options...
fuccaro Posted May 15, 2008 Share Posted May 15, 2008 -Copy-paste the code in Notepad and save the file as Sumvolume.LSP -Open a drawing, create some solids, drag the lisp file in the drawing area -Select one or more solids -Enter (sumvolume) in the command line If it works, modify the lisp to suit your needs and make a button to start it -I could write you how to change the density to work with other units Quote Link to comment Share on other sites More sharing options...
anjney kumar rai Posted September 3, 2008 Share Posted September 3, 2008 good morning sir i am from india iam student of the mechanical engg. iwant to learn about the layers into the autocad 2oo8.kindly send me some easy steps in detail. Quote Link to comment Share on other sites More sharing options...
GE13579 Posted September 3, 2008 Share Posted September 3, 2008 Anjney- your question is rather too general to be answered in a forum. You should research a little more into Layers and then come back with some more specific answers. Also you will get a better response if you start a new thread. :wink: Also, welcome to the forum! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.