第1个回答 2010-11-16
(Defun c:draw ( / cmd pot rad rai )
(setq cmd (getvar "cmdecho"))
(setvar "cmdecho" 0)
(if (setq pot (getpoint "\n请选择圆心=>"))
(if (setq rad (getdist pot "\n请输入基圆半径: "))
(repeat 4
(if (null rai) (setq rai rad) (setq rai (* rai 1.2)) )
(command "_.Circle" pot rai)
)
(princ "\n未输入圆半径,退出")
)
(princ "\n未选择圆心,退出")
)
(setvar "cmdecho" cmd) (princ)
)
保存为drawing.lsp就行了