看看是不是这个意思?- (defun c:test( / ss pt i ent ents pts pte os)
- (setq os (getvar "osmode"))
-
- (prompt "选择直线...")
- (setq ss (ssget '((0 . "LINE"))))
- (setq pt (getpoint "选择圆心:"))
- (setq i 0)
- (command "_.undo" "be")
- (setvar "osmode" 0)
- (repeat (sslength ss)
- (setq ent (ssname ss i))
- (setq ents (entget ent))
- (setq pts (cdr (assoc 10 ents)))
- (setq pte (cdr (assoc 11 ents)))
- (entdel ent)
- (command "_.arc" "c" pt pts pte)
- (setq i (1+ i))
- )
- (setvar "osmode" os)
- (command "_.undo" "e")
- (princ)
- )
|