 - (defun c:13(/ o s)
- (if (setq o(getpoint"\n请指定坐标原点:"))
- (command "qleader" "non" o "\\" "" "" 0 "" "ucs" o "")
- )
- (while
- (setq o (getpoint"\n请指定坐标点:"))
- (if (setq s (ssget "c" o o '((0 . "circle,arc"))) )
- (progn
- (setq s (entget (ssname s 0)))
- (SETQ o (trans (cdr (assoc 10 s)) 0 1))
- )
- ) ;如果选中的是圆或圆弧,则自动移到圆心
- (princ (strcat "\n请指定 "(strcat"X "(rtos(car o)2 2))" "(strcat"Y "(rtos(cadr o)2 2))" 的文字位置"))
- (command "leader" "non"o"\\" ""(strcat"X "(rtos(car o)2 2))(strcat"Y "(rtos(cadr o)2 2))"")
- ) ;while
- (command "ucs" "w")
- (setq o nil s nil)
- (princ))
试试这样?
|