缩放命令改造
请才高手我想把缩放命令scale进行改造,用参照的方法,省略输入R参数,怎么改造?
谁有办法改造这个原生命令?
(DEFUN C:TT()
(if (and
(setq ss (ssget))
(setq pt (getpoint "指定指点"))
)
(COMMAND "scale" ss "" pt "R" pt pause)
)
) 永不言弃 发表于 2020-2-21 13:00
(DEFUN C:TT()
(if (and
(setq ss (ssget))
:handshake感谢 ;;; 放大缩小 倍数 ;;;;;;;;;;
(defun c:V01() (setq rr (ssget)) (command "scale" rr "" pause "0.1" )(princ "\n缩小0.1倍")(princ))
(defun c:V02() (setq rr (ssget)) (command "scale" rr "" pause "0.2" )(princ "\n缩小0.2倍")(princ))
(defun c:V03() (setq rr (ssget)) (command "scale" rr "" pause "0.3" )(princ "\n缩小0.3倍")(princ))
(defun c:V04() (setq rr (ssget)) (command "scale" rr "" pause "0.4" )(princ "\n缩小0.4倍")(princ))
(defun c:V05() (setq rr (ssget)) (command "scale" rr "" pause "0.5" )(princ "\n缩小0.5倍")(princ))
(defun c:V06() (setq rr (ssget)) (command "scale" rr "" pause "0.6" )(princ "\n缩小0.6倍")(princ))
(defun c:V07() (setq rr (ssget)) (command "scale" rr "" pause "0.7" )(princ "\n缩小0.7倍")(princ))
(defun c:V08() (setq rr (ssget)) (command "scale" rr "" pause "0.8" )(princ "\n缩小0.8倍")(princ))
(defun c:V09() (setq rr (ssget)) (command "scale" rr "" pause "0.9" )(princ "\n缩小0.9倍")(princ))
(defun c:V1 () (setq rr (ssget)) (command "scale" rr "" pause "1" )(princ "\n放大1倍")(princ))
(defun c:V2 () (setq rr (ssget)) (command "scale" rr "" pause "2" )(princ "\n放大2倍")(princ))
(defun c:V3 () (setq rr (ssget)) (command "scale" rr "" pause "3" )(princ "\n放大3倍")(princ))
(defun c:V4 () (setq rr (ssget)) (command "scale" rr "" pause "4" )(princ "\n放大4倍")(princ))
(defun c:V5 () (setq rr (ssget)) (command "scale" rr "" pause "5" )(princ "\n放大5倍")(princ))
(defun c:V6 () (setq rr (ssget)) (command "scale" rr "" pause "6" )(princ "\n放大6倍")(princ))
(defun c:V7 () (setq rr (ssget)) (command "scale" rr "" pause "7" )(princ "\n放大7倍")(princ))
(defun c:V8 () (setq rr (ssget)) (command "scale" rr "" pause "8" )(princ "\n放大8倍")(princ))
(defun c:V9 () (setq rr (ssget)) (command "scale" rr "" pause "9" )(princ "\n放大9倍")(princ)) 直接输入放大倍数的命令 好多了 ninja37 发表于 2020-2-22 20:16
直接输入放大倍数的命令 好多了
你这种定义方法如果要定义一亿种倍数(任何实数),是否得写一亿条函数?
tryhi 发表于 2020-2-24 17:31
你这种定义方法如果要定义一亿种倍数(任何实数),是否得写一亿条函数?
一般放到1-10倍做20个命令 绰绰有余了 就算这1-10倍很多都用的少 什么6倍7倍 如果有小数倍数或者特殊倍数再老老实实用SC命令 可能是行业不同 我这个行业完全够了 行业不同 我这个行业完全够了
页:
[1]