贴一个 lenlenq 写的程序。不知楼主是要这个程序吗
- (defun layer-op (la / tbl clo)
- (if (setq tbl (tblsearch "layer" la))
- (progn
- (setq clo (cdr (assoc 62 tbl)))
- (setq cla (getvar "clayer"))
- (if (> clo 0)
- (if (/= cla la)
- (command "layer" "off" la "" )
- (command "layer" "off" la "Y" "" )
- )
- (command "layer" "on" la "" )
- )
- )
- (alert (strcat "本图档无{"la"}图层"))
- )
- )
- (defun c:1()
- (layer-op "1")
- (princ)
- )
- (defun c:2()
- (layer-op "2")
- (princ)
- )
|