 - (defun c:tt ()
- (vl-load-com)
- (print "选择范围")
- (setq ss (ssget (list '(0 . "LWPOLYLINE"))))
- (setq nn1 0
- k 0
- )
- (repeat (sslength ss)
- (setq sty (ssname ss nn1))
- (setq sty1 (entget sty))
- (ertwefewfds)
- (setq nn1 (1+ nn1))
- )
- (print (strcat "共处理了" (rtos nn1 2 0) "个文字"))
- (princ)
- )
- (defun ertwefewfds ();;;取出文字
- (setq lis (mapcar 'cdr
- (vl-remove-if '(lambda (x) (/= (car x) 10)) sty1)
- )
- )
- (setq t1 (ssget "wp" lis (list (cons 0 "TEXT"))))
- (if (/= t1 nil)
- (sijfioweuofj)
- )
- )
- (defun sijfioweuofj()
- (setq n (sslength t1)
- m 0
- )
- (setq lj "")
- (while (< m n)
- (setq e (entget (ssname t1 m))
- m (1+ m)
- )
-
- (setq trr (strcat (cdr (assoc 1 e)) lj ))
- (setq lj trr)
- (print (strcat "正在处理:" trr))
- (princ)
- )
- (setq xwzz (vlax-ename->vla-object (cdr(car(entget (ssname t1 0))))))
- (vla-put-textstring xwzz trr)
- (if (> n 1)(werwcdfvxvd))
- )
- (defun werwcdfvxvd ()
- (setq aaa 1)
- (repeat (- n 1)
-
- (setq
- xwzz (vlax-ename->vla-object (cdr (car (entget (ssname t1 aaa)))))
- )
- (setq aaa (1+ aaa))
- (vla-put-textstring xwzz "")
- )
- )
|