masterlong发表于2010-10-8 0:15:00 另外lx的值要预先定义
请问lx的值要预先定义,是要如何设置?
我改成:
(defun c:102()
(SETQ nhz (GETSTRING (strcat "\n类型:S:水泥地 W:围墙 F:房角 H:花圃 <" lx "> :>" )))
(cond ((= (strcase nhz nil) "S") (aaa)) ((= (strcase nhz nil) "W") (ABB)) ((= (strcase nhz nil) "H") (ABC)) )
(defun aaa()
(setq p1 (getpoint "\n指定文字点:"))
(command "text" "j" "tl" p1 "" "" "水泥地" "") )
(defun aBB()
(setq p1 (getpoint "\n指定文字点:"))
(command "text" "j" "tl" p1 "" "" "围墙" "") )
(defun aBC()
(setq p1 (getpoint "\n指定文字点:"))
(command "text" "j" "tl" p1 "" "" "花圃" "") ) )
运行还是出错,显示
C:102 命令: 102 ; 错误: 参数类型错误: stringp nil
请问是什么原因?
另外看见有
(setq dh1 (getvar "users4"))
(SUBSTR (getvar "users5"))
等语句,请问users5与users4是什么意思?是代表变量值吗?
望指教。
谢谢
|