iCAx开思网
标题:
个人开发-五金连续模设计-更层拷贝autolisp
[打印本页]
作者:
chenjian1
时间:
2005-11-13 20:56
标题:
个人开发-五金连续模设计-更层拷贝autolisp
;;;********************************************************************1
;;;将选取的图形拷贝到指定的图层 Command:k
;;;2004-01-08 Chen Jian
;;;Version 1.0
;;;MADE IN CHINA
(defun c:K(/ en2 en3 yesno)
(setvar "cmdecho" 0)
(princ "请选取欲拷贝的图形:")
(setq en2 (ssget)) ;选取欲拷贝的图形
(if (= en2 nil)
(sub-quit)
(sub-kkk en3 chklay YESNO)
)
)
(defun sub-kk()
(command "copy" en2 "" "0,0" "")
(command "change" en2 "" "p" "la" en3 "")
(princ "\n所选图已拷贝到图层")
(prin1 en3)
(prin1))
(defun sub-kkk (en3 chklay yesno)
(setq en3 (getstring "请输入图层名:"))
(if (= en3 "")
(progn (sub-quit))
(progn (setq chklay (tblsearch "layer" en3))
(if (= chklay nil)
(progn(setq yesno(getstring "\n层不存在,是否建立<N>:"))
(if (or (= yesno "Y") (= yesno "y"))
(progn
(command "layer" "n" en3 "")
(sub-kk)
)
(progn (sub-quit))
)
)
(progn (sub-kk))
)
)
)
)
有问题请E-mail:ChenJianCaiHong@163.com
作者:
chenjian1
时间:
2005-11-17 12:23
请大家用后发表一下意见
欢迎光临 iCAx开思网 (https://www.icax.org/)
Powered by Discuz! X3.3