;在X、Y方向上按一定比例缩放,并且可以旋转
(defun C:SF (/ SS IP XS YS RA)
(setvar "cmdecho" 0)
(setq SS (ssget)
IP (getpoint "\n指定基点:")
) ;_ end of setq
(initget 6)
(setq XS (getreal "\n指定X方向的比例因子 <1>:"))
(initget 6)
(setq YS (getreal "\n指定Y方向的比例因子 (默认=X):")
RA (getreal "\n指定旋转角度 <0>:")
) ;_ end of setq
(if (= XS NIL)
(setq XS 1)
) ;_ end of if
(if (= YS NIL)
(setq YS XS)
) ;_ end of if
(if (= RA NIL)
(setq RA 0)
) ;_ end of if
(command
"block" "xstemp" IP SS "" "insert" "xstemp" IP XS YS RA "explode"
"l" "purge" "b" "xstemp" "n"
) ;_ end of command
(setvar "cmdecho" 1)
(PRINC)
) ;_ end of defun