- (DEFUN C:TT(/ S lst portext e en l1 a p lst)
- (defun portext(en / p)(if(equal(setq p(cdr(assoc 10 en)))'(0 0 0))(cdr(assoc 11 en))p))
- (and(SETQ S(SSGET'((0 . "TEXT"))))
- (while(setq e(ssname s 0))
- (setq en(entget e)a(cdr(assoc 1 en))p(list(substr a 1 1)(cons(read(substr a 2))(portext en))))
- (ssdel e s)
- (if(setq l1(assoc(car p)lst))
- (setq lst(subst(vl-list*(car p)(cadr p)(cdr l1))l1 lst))
- (setq lst(cons p lst))))
- (vl-every(function(lambda(x)
- (entmakex(append(mapcar'cons'(0 100 100 62 90)(list"lwPolyline""AcDbEntity""AcDbPolyline"(1+(vl-position x lst))(length(cdr x))))
- (mapcar'(lambda(x)(cons 10(cdr x)))(vl-sort(cdr x)'(lambda(x y)(<(car x)(car y)))))))))lst)))
|