|
(defun cp()( G( @0 h% Y" T. H! u/ ]
(setq bj (getreal "\\n 请输入圆半径:"))
0 \' C% w( k' ?" X/ Q) e& {! p4 ]9 Y. r2 Y(setvar "osmode" 0)- k) P1 Y# ~1 h" b4 t1 N( d
(setq ss (ssget \'((0 . "point"))))6 @! J% ] I$ W% f) _
(setq len (sslength ss))
0 ] R$ ?/ _: }8 w* ^(setq n 0)
( u- N, I8 |, M7 U3 D(command "undo" "begin")- b1 _- h) Y1 t6 y
(repeat len* h5 N k% m# _# M: R; J. |
(setq ent (ssname ss n))
$ t, U) g, h2 \5 y(setq yuanxin (trans (cdr (assoc 10 (entget ent))) 0 1))
) D7 ~, R" S) J% G(command "circle" yuanxin bj)
& w* o; U6 S" X(setq n (+ 1 n))! C1 O9 |0 ^2 x9 b! s
)! F( e( s, A. E3 ]" q+ I% n) q
(command "undo" "end")是这样的吗?如何应用? |
|