0 Members and 1 Guest are viewing this topic.
How to merge all layer and keep all object its color ?Who has some vlx files can help me to achieve this goal ?My native language is not English ,if you do not understand my meaning ,please reply my post
(defun c:demo (/ func_ mlist e ly)(defun func_ (en l) (entmod (append en l))) (if (setq ss (ssget "_X")) (repeat (setq i (sslength ss)) (setq e (entget (ssname ss (setq i (1- i))))) (if (not (assoc (setq ly (cdr (assoc 8 e))) mlist)) (setq mlist (cons (cons ly (cdr (assoc 62 (tblsearch "Layer" ly)))) mlist ) ) ) (if (not (cdr (assoc 62 e))) (setq e (func_ e (list (cons 62 (cdr (assoc ly mlist))))))) (setq e (func_ e '((8 . "ALL"))));<--- Your preferred layer name ) )(princ))