millermin 发表于 2012-6-13 18:27 
有人懂点吗?
 - (defun c:tt(/ D LAYERS LOOP LA GO)
- (while (setq d (tblnext "layer" (null d)))
- (setq layers (cons (cdr (assoc 2 d)) layers))
- )
- (command "layer" "t" "*" "off" "*" "y" "")
- (setq loop t)
- (while loop
- (setq la (car layers)
- layers (cdr layers)
- )
- (command "layer" "on" la "")
- (command "zoom" "")
- (while (= 1 (getvar 'cmdactive))
- (vl-cmdf pause)
- )
- (command "layer" "off" la "")
- (if (not layers)
- (setq loop nil)
- (progn
- (initget "Yes No")
- (setq go (getkword "[继续<Yes/No>]<Yes>"))
- (if (= "No" go) (setq loop nil))
- )
- )
- )
- (command "layer" "on" "*" "")
- (princ)
- )
|