WOULD ANYONE HAVE A LISP PROGRAM ON CONVERTING MASSPROP FROM A VOLUME UNIT TO A WEIGHT UNIT BY INTRODUCING A DENSITY FACTOR RELATING TO MATERIAL OF THE OBJECT DRAWN.
If someone answers this question, please forward it to me. I am also looking for a very similar lisp routine to return region section properties and place the data into a table/block that I've created. enclad@sbcglobal.net
if your looking for a lisp that allows you to select a solid or group of solids then report the weight and center of gravity, then this is your lisp for autocad 2000 and up
;This program draws a point at the centroid of a
;region or solid. The point is drawn on the current
;layer at the current settings. It creates a file
;called deleteme.mpr in c:\temp directory that can
;be deleted if wanted, otherwise the program will
;just overwrite it everytime it runs.
(defun c:CG2002 (/ ss mprfile title c-steel s-steel alumn UHMW Neoprene Pine )
(setq c-steel 0.2833
s-steel 0.286
alum 0.098
UHMW 0.0347
Neoprene 0.045
Pine 0.022)
(setvar "filedia" 0)
(setvar "cmdecho" 0)
(print "Select solids or regions"
(setq ss (ssget))
(command "massprop" ss "" "y" "c:/temp/deleteme"
(setvar "filedia" 1)