- ;| mcir = 灵活定半径画圆---------------by 无痕.2005.4
- |;
- (defun c:mcir (/ p)
- (if (not *ms)
- (setq *ms (vla-get-ModelSpace(vla-get-activedocument(vlax-get-acad-object))))
- )
- (while (not *rad)(setq *rad (getdist "\n输入半径:"))) ;;强制初始化半径.
- (while (or(not(mapcar 'princ (list "\n当前半径=" *rad)))
- (initget 128) (setq p (getpoint "\n R 两点定半径 / 直接输入半径值 / 点取圆心 / <退出>:"))
- )
- (cond
- ((listp p) (vla-addcircle *ms (vlax-3d-point p) *rad))
- ((= "R" (strcase p))(setq *rad (getdist "\n输入半径:")))
- ((> (distof p) 0)(setq *rad (distof p)))
- )
- )(princ)
- )
|