|
(defun C:tt () (setvar "osmode" 0) (if (setq ent1 (car (entsel "选择源<退出>"))) (progn (prompt "\n请选择将替换的图块<退出>") (if (setq ss (ssget (list (cons 0 "insert")))) (progn (setq pt1 (cdr (assoc 10 (entget ent1)))) (repeat (setq n (sslength ss)) (setq ent2 (ssname ss (setq n (1- n)))) (setq pt2 (cdr (assoc 10 (entget ent2)))) (command "COPY" ent1 "" pt1 pt2 ) (entdel ent2) ) ) ) ) ) (setvar "osmode" 1) (princ) ) |
|