Search the Community
Showing results for tags 'bad'.
-
What is wrong with this code? (; error: bad argument type: stringp)
Perifanos posted a topic in AutoLISP, Visual LISP & DCL
(defun C:Heatest() (Princ "Define Area:") (Command "area") (while (= 1 (getvar "cmdactive")) (command pause) ) (setq A (getvar "area")) (princ A) ) -
Why is this not working? I tried serching for the answer online but I didn't find anything that helped. When I run the lisp routine, it gives me this "bad argument type: numberp: "30"" the 30 is the user entered Original Scale. ; CORRECT SCALE OF OBJECT (DEFUN C:FXS () (setq DS (getvar 'dimscale)) (setq OS (getstring "\nOriginal Scale: ")) (PROMPT "\nPick object to SCALE : ") (setq A (ssget)) (setq DST (rtos DS 2 4)) (setq OST (rtos OS 2 4)) (SETQ SF (/ DST OST)) (COMMAND "scale" A "" PAUSE SF) (princ) )