@anderson51 wrote:
I am trying to figure out how to write a LISP routine or generate an equation within a command that will take MASSPROP and divide that number by 17.28, then times it by 4.9.......when I click on a solid?
I apprecite the help.
Anderson
Hi Anderson,
@ the Visual LISP, AutoLISP and General Customization forum should be easier to help with Auto/Visual LISP
Perhaps something like this to do the trick
(vl-load-com)
(defun c:demo (/ obj ss val vol)
(if (and (princ "\n Select a 3D Solid: ")
(setq ss (ssget "_+.:E:S" '((0 . "3DSOLID"))))
)
(progn
(setq obj (vlax-ename->vla-object (ssname ss 0))
vol (vla-get-volume obj)
val (* (/ vol 17.28) 4.9)
)
(princ (strcat "\n The value is: " (rtos val 2 2)))
)
(princ "\n You didn't select a 3D Solid... ")
)
(princ)
)
Hope this helps,
Henrique