- ;按层存文件 明经 ZZXXQQ 2011.1.6
- (defun c:tt ()
- (setvar "CMDECHO" 0)
- (setq lnm nil)
- (while (setq lnm (tblnext "LAYER" (not lnm)))
- (if (setq ss (ssget "X" (list (cons 8 (cdr(assoc 2 lnm))))))
- (command ".WBLOCK" (strcat "NewLayer=" (cdr(assoc 2 lnm))) "" "0,0" ss "")
- )
- )
- (setvar "CMDECHO" 1)
- (princ)
- )
|