本帖最后由 danxingpen 于 2015-5-31 17:31 编辑
- (defun c:tt ()
- (if (setq ss (ssget '((0 . "LEADER"))))
- (repeat (setq i (sslength ss))
- (setq ent (entget(ssname ss (setq i (1- i)))))
- (setq ptx (cadr(assoc 10 ent)))
- (setq a 0
- n(length ent)
- )
- (foreach x ent
- (if (= (car x) 10)
- (progn
- (setq a(1+ a))
- (if (= a 2)
- (setq movex (- ptx (cadr x)))
- )
- )
- )
- )
- (setq mtext(cdr(assoc '340 ent)))
- (setq mtext(entget mtext))
- (setq mtext(subst (cons 10 (mapcar '+ (cdr (assoc '10 mtext))(list movex 0 0)))
- (assoc '10 mtext)
- mtext
- ))
- (entmod mtext)
- )
- )
- (princ)
- )
;在ZZXXQQ的基础上改了一下,你这个引线带编组的,主驱动是mtext,,,所以,,,,他们的都移动不了
|