这个在本站下的自动编号,为何不能用?提示; 错误: no function definition: XD-STRING_ZEROPAD,请高手帮看看,哪出错? (defun c:bh (/ oce1 n1 zn h1 sxh1 p1) (vl-load-com) (setq oce1 (getvar "cmdecho")) (setvar "cmdecho" 0) (setq ms (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object)) ) ) (if qz () (setq qz "") ) (if hz () (setq hz "") ) (initget "c") (setq nqz (getstring (strcat "\n请输入前缀相同的部分<" qz ">/c(为空): " ))) (cond ((= nqz "c") (setq qz "")) (T (if (/= nqz "")(setq qz nqz))) ) (setq nhz (getstring (strcat "\n请输入后缀相同的部分<" hz ">/c(为空): " ))) (cond ((= nhz "c") (setq hz "")) (T (if (/= nhz "")(setq hz nhz))) ) (if (not (setq n1 (getint "\n请输入起始顺序号 <1>: "))) (setq n1 1) ) (if (not (setq zn (getint "\n请输入增加或减少的序数 <+1>: "))) (setq zn 1) ) (if (not (setq h1 (getreal "\n请指定文字高度 <2.5>: "))) (setq h1 2.5) ) (setq sxh1 (strcat qz (xd-string_zeropad n1 3 "0" 0) hz)) (setq p1 (getpoint "\n请指定插入点: ")) (while (/= p1 nil) (setq p1 (vlax-3d-point p1)) (setq txt (vla-addtext ms sxh1 p1 h1 ) ) (setq n1 (+ n1 zn) sxh1 (strcat qz (xd-string_zeropad n1 3 "0" 0) hz) p1 (getpoint "\n请指定下一插入点: ") ) ) (setvar "cmdecho" oce1) (vlax-release-object ms) (princ) ) |