新人写的程序,求高手帮忙完善下
先上图在上源码.
- (defun c:dxf-ma ( / )
- (setq INT (getint "\n选择组码: "))
- (if (setq en (entsel "\n选择源对象<退出>: ")
- ENT (entget (car en))
- typ (cdr (assoc 0 ENT))
- TMP (assoc INT ENT)
- )
- (progn
- (redraw (car en) 3)
- (princ "\n 选择目标: ")
- (setq ss (ssget (list (cons 0 typ))) I 0 n (sslength ss))
- (repeat n
- (setq ENT (entget (ssname ss I)))
- (entmod (subst TMP (assoc INT ENT) ENT))
- (setq I (1+ I))
- )
- (redraw (car en) 4)
- )
- )
- (princ)
- )
|