|
(defun c:tt()
(vl-load-com)
(prompt "\n 选择对象<退出>")
(if (and
(setq ss (ssget ))
(setq pt1 (getpoint "\n 指定起点<退出>"))
)
(while (setq pt2 (getpoint pt1 "\n 指定插入点<退出>"))
(setq ss1 (ssadd))
(repeat (setq k (sslength ss))
(setq ent (ssname ss (setq k (1- k))))
(command "COPY" ent "" pt1 pt2)
(setq ent1 (entlast))
(ssadd ent1 ss1 )
(if (= (cdr (assoc 0 (entget ent))) "TEXT")
(progn
(setq str (atoi (cdr (assoc 1 (entget ent)))))
(setq ojb (vlax-ename->vla-object ent1))
(vla-put-TextString ojb (rtos (setq str (1+ str)) 2 0))
)
)
)
(setq ss ss1)
(setq pt1 pt2)
)
)
)
|
|