尝试
- (defun c:test (/ ss i ed p [color="red"]sz[/color])
- [color="red"](initget 6)
- (if (not(setq sz (getdist "\nText size : ")))
- (setq sz (getvar "textsize")))[/color]
- (prompt "\nSelect Contour.. ")
- (if (setq ss (ssget ":L" '((0 . "LWPOLYLINE"))))
- (repeat (setq i (sslength ss))
- (setq ed (entget (ssname ss (setq i (1- i)))))
- (foreach x (list (car (setq p (vl-remove-if ''((x) (/= (car x) 10)) ed))) (last p))
- (entmakex (list '(0 . "TEXT")'(8 . "CONTOUR LABEL")
- (cons 1 (rtos (cdr (assoc 38 ed)) 2 3))
- (cons 40[color="red"] sz[/color])
- x
- ) ;_ end of list
- ) ;_ end of entmakex
- ) ;_ end of foreach
- ) ;_ end of repeat
- ) ;_ end of if
- (princ)
- ) ;_ end of defun
我希望比格尔现在能理解即时消息,帮助OP |