I am writing a LISP code to give me the distance in decimal feet. Here is what I have so far:
Code:
;gives distance in decimal feet
(defun C:FE ()
(command "-units" "2" "3" "1" "3" "0.000" "n")
(command "DIST" pause pause)
(setq convert 12)
(/ DISTANCE convert)
(princ)
)
The problem is in the division of the distance variable. When the distance command is used, it stores a read-only variable called "DISTANCE". All I want to do is divde this variable by 12 to give me feet. I am setting up a "convert" variable because I thought that AutoLISP wouldn't let me divde the variable DISTANCE by the number twelve directly, as in:
I would appreciate any responses to this problem.
Blaine