- (defun c:tt(/ E SS SS1 SS2 N P1 P2 LSTSS1 LSTSS2 SSS)
- (defun getdxf(s num)(cdr(assoc num s)))
- (setq ss(ssget '((0 . "dimension"))) n 0 SSS (SSADD))
- (repeat (sslength ss)
- (setq e(ssname ss n)
- s(entget e)
- p1(getdxf s 10)
- clz1(abs(-(car(getdxf s 13))(car(getdxf s 14))))
- clz2(abs(-(cadr(getdxf s 13))(cadr(getdxf s 14))))
- P2(list (- (car p1)clz1)(- (cadr p1)clz2)(caddr p1))
- )
- (SETQ SS1(SSGET "C" P1 P1 '((0 . "dimension")))
- LSTSS1(SS2LST SS1)
- SS2(SSGET "C" P2 P2 '((0 . "dimension")))
- LSTSS2(SS2LST SS2)
- )
- (if (and ss1 ss2)
- (progn
- (SSDEL E SS1)
- (SSDEL E SS2)
- (IF (AND (EQUAL LSTSS1 LSTSS2)
- (>(LENGTH LSTSS1)0)
- (>(LENGTH LSTSS2)0)
- )
- (repeat(setq m(sslength ss1))
- (SSADD (ssname ss1(setq m(1- m))) SSS)
- )
- )
- )
- )
- (setq n(1+ n))
- )
- (SSSETFIRST SSS SSS)
- (princ)
- )
- (defun ss2lst (ss / nn ee lst)
- (if ss
- (repeat (setq nn (sslength ss))
- (setq lst (cons (ssname ss (setq nn (1- nn))) lst))
- )
- )
- )
|