;;;Move a selection set to a specified layer. (uses USTR) ;;; ;;; ;;; ;;;> Author: Henry C. Francis ;;;> 425 N. Ashe St. ;;;> Southern Pines, NC 28387 ;;;> http://paracadd.com ;;;> All rights reserved. ;;; ;;;> COPYRIGHT: 9-19-95 ;;;> EDITED: 04-08-1997 ;;; (defun c:mtol ( / ss ssl cnt ename ent nent pic8 new8) (setq ss (ssget) ssl (sslength ss) cnt 0 );setq (if (setq pic8 (entsel "\nSelect entity on \"move to\" layer or to key-in. ")) (setq new8(cdr(assoc 8(entget(car pic8))))) (setq new8 (ustr 1 "\Enter layer name to move to. " (getvar"clayer") nil)) );if (if (tblsearch "LAYER" new8) nil (command ".layer" "m" new8 "") );if (while (< cnt ssl) (setq ename (ssname ss cnt) ent (entget ename) nent (cdr (subst (cons 8 new8) (assoc 8 ent) ent) );cdr cnt (1+ cnt) );setq (entdel ename) (entmake nent) );while (princ) );defun