如果能有这样的程序就不用切换图层了
如果能有这样的程序就不用切换图层了:1q:切换到 层激活 L
2w:切换到 层激活 L
3e:切换到 层激活 L
4r:切换到 层激活 L
5t:切换到 层激活 L
6y:切换到 层激活 L
7u:切换到 层激活 L
8i:切换到 层激活 L
9o:切换到 层激活 L
0p:切换到 层激活 L
q1:切换到 层激活 rec:
w2:切换到 层激活 rec
e3:切换到 层激活 rec
r4:切换到 层激活 rec
t5:切换到 层激活 rec
y6:切换到 层激活 rec
u7:切换到 层激活 rec
i8:切换到 层激活 rec
o9:切换到 层激活 rec
p0:切换到 层激活 rec
以此类a,c,,,,,,
不知哪位大侠能造福人类呢?
期待着!!!!!!
(command "-layer" "s" "1" "") ;切换至1层
;或者:
(vl-load-com)
(setq *doc* (vla-get-activedocument (vlax-get-acad-object)))
;取得激活的当前图层
(setq currlayer(vla-get-activelayer *doc*))
;建立一个"testlayer"层
(setq layersel(vla-get-layers *doc*))
(setq newlayer(vla-add layersel "testlayer"))
;将其设成激活的图层
(vla-put-activelayer *doc* newlayer) 切换图层不是很麻烦吧 我是对 lsp 是一窍不通!
我很饿,
你端着山珍海味走过,
谢谢你让我望梅止渴! 刚接手LISP消化没那么快。 理解着貌似是这意思,具体图层名自己改再,个人觉得这样的程序实在没啥意义,只是养成了很坏的作图习惯
(command "-layer" "M" "1q""M" "q1" "M" "2w""M" "w2" "M" "3e""M" "e3" "")
;此处省略两千字
(defun c:1q() (setvar "clayer" "1q") (command "line" ))
(defun c:2w() (setvar "clayer" "2w") (command "line" ))
(defun c:3e() (setvar "clayer" "3e") (command "line" ))
(defun c:4r() (setvar "clayer" "4r") (command "line" ))
(defun c:5t()(setvar "clayer" "5t") (command "line" ))
(defun c:6y()(setvar "clayer" "6y") (command "line" ))
;此处省略一万字
(defun c:q1() (setvar "clayer" "q1") (command "RECTANG" ))
(defun c:w2() (setvar "clayer" "w2") (command "RECTANG" ))
(defun c:e3() (setvar "clayer" "e3") (command "RECTANG" ))
(defun c:r4() (setvar "clayer" "r4") (command "RECTANG" ))
(defun c:t5() (setvar "clayer" "t5") (command "RECTANG" ))
(defun c:y6() (setvar "clayer" "y6") (command "RECTANG" ))
(defun c:u7() (setvar "clayer" "u7") (command "RECTANG" ))
;此处省略一万字 意义很大,程序就是工具,程序可以完成的事,没必要去人工重复的去切换,我们要把更多的精力用在设计上! 谢谢大师的好程序!!!
顺便向你请教一个问题:
在 cui 里新建的命令,如何才能用 字母+空格作为其快捷键呢??? 看下如何。。。。。。。 试试贱人工具箱里的图层工具吧。个人觉得这样的lsp意义不大。
页:
[1]
2