gS7 发表于 2022-7-6 03:25:00

bad argument type: stringp nil

Hey Big Bros,Need Little Help Here ,
i am getting error msg i.e bad " argument type: stringp nil"
I dnt understand where i doing mistake pls help
 
if i Try to debug Program ,Lst Break source showing here (strcat "\n--->Error:" s))
 

(defun c:sqn(/ *error* _def dtr adoc space th rot point)   (vl-load-com)(defun *error* (s)    (if adoc (vla-endundomark adoc)) (if (not (member s '("Function cancelled" "quit / exit abort")))   (princ (strcat "\n--->Error:" s)) )    (princ))(defun dtr (a)(* pi (/ a 180)) )(setq adoc (vla-get-activedocument (vlax-get-acad-object)))(setq space (vla-get-modelspace adoc))(vla-startundomark adoc)(if    (and   (setq th (getreal "\nEnter Value for Text Height:"))(setq rot (getreal "\nEnter Value for Text Rotation in Degrees:")) ) (progn   (defun _def (msg *ans*)            (if (not *ans*)(setq *ans* 1))         (setq *ans*            (cond            ((getreal(strcat msg ":"))         )      (*ans*)       )      )   )      (setq inr (_def "\nEnter number:" inr))      (while             (if (setq point (getpoint (strcat "\nPick Point to place :")))       (progn               (setq Text(vla-addtext space(rtos inr) (vlax-3d-point point) th))               (vla-put-rotation Text (dtr rot))            (setq inr(1+ inr))    )   )) ))(*error* nil)(princ))

gS7 发表于 2022-7-6 03:55:26

oops My mistake , I found soluction for the error!
I changed Last Linefrom (*error* nil) to (vla-endundomark adoc) and its worked Perfectly

asos2000 发表于 2022-7-6 04:41:47

And see this http://www.lee-mac.com/errormessages.html
页: [1]
查看完整版本: bad argument type: stringp nil