我有4个问题请高手一一解答1.请帮我翻译下面一串代码的意思,每句都要。(defun c:1()(setq gb (getvar "cmdecho"))(setvar "cmdecho" 0)(princ "锁定选择物体的图层: ") (setq s0 (ssget))(setq i 0)(while (ssname s0 i)(setq laname (cdr (assoc 8 (entget (ssname s0 i)))))
请高手一一解答
1.请帮我翻译下面一串代码的意思,每句都要。
(defun c:1()
(setq gb (getvar "cmdecho"))
(setvar "cmdecho" 0)
(princ "锁定选择物体的图层: ")
(setq s0 (ssget))
(setq i 0)
(while (ssname s0 i)
(setq laname (cdr (assoc 8 (entget (ssname s0 i)))))
(command "layer" "lo" laname "" )
(setq i (1+ i))
)
(setvar "cmdecho" gb))
2.我自己写了一个代码,但是好像不对,请帮我看一下。
(defun c:89()
(setq gb (getvar "cmdecho"))
(setvar "cmdecho" 0)
(princ "解锁选择物体的图层: ")
(setq s0 (ssget))
(setq i 0)
(while (ssname s0 i)
(setq laname (cdr (assoc 8 (entget (ssname s0 i)))))
(command "vplayer" "f" laname "" )
(setq i (1+ i))
)
(setvar "cmdecho" gb))
3.根据2提出来的问题,我想求一个cad冻结视口的lisp命令,效果要和vplayer 然后选择f的命令效果一样。
4.cad 模型空间和图纸空间来回切换是通过TILEMODE变量1或者0实现的,想求一个lisp代码,只需一个命令就可以来回切换他们。