 - ;; tt(分路箱编号递增)
- (defun c:tt ()
- (setq n3 (getint "\n请输入开始箱号<默认1>: "))
- (if (= n3 nil)
- (setq n3 1)
- )
- (while (setq wz (ssget ":E:S"))
- (setq obj (vlax-ename->vla-object (ssname wz 0))
- qz (cond ((< n3 10) "000")
- ((< n3 100) "00")
- ((< n3 1000) "0")
- ((< n3 10000) "")
- )
- tx (strcat qz (itoa n3) "#箱")
- n3 (1+ n3)
- )
- (vla-put-textstring obj tx)
- )
- (princ)
- )
|