 - (defun c:tt (/ lst)
- (setq lst '(("*Door*" "*门*") "A-Door"))
- (mergelayers (car lst) (cadr lst))
- (princ)
- )
- (defun mergelayers (lst-match to / lst def la)
- (while (setq def (tblnext "LAYER" (null la)))
- (foreach a lst-match
- (if (wcmatch (setq la (cdr (assoc 2 def))) a)
- (setq lst (cons la lst))
- )
- )
- )
- (if (setq lst (vl-remove to lst))
- (progn
- (command "_.LAYMRG")
- (foreach e lst (command "_Name" e))
- (command "" "_N" to "_Y")
- )
- )
- (princ)
- )
|