 ; Lms - Move entities to another layer, make that layer the current one.
 ; Copyright 1990, 1997 by Rocket Software
 ; Why are you reading this?  Don't you have work to do?
 (DEFUN C:LMS ( / tt zz ss num)
  (setvar "cmdecho" 0)
  (command "undo" "mark")
  (write-line "Objects to move: ")
  (if (and (setq ss (ssget))
           (setq tt (entsel "Select an entity on the desired layer: ")))
      (progn
           (setq zz (cdr (assoc 8 (entget (car tt)))))
           (command "change" ss "" "p" "layer" zz "")
           (command "layer" "s" zz "")
           (setq num (sslength ss))
           (if (= num 1) (setq tt " item ") (setq tt " artifacts "))
           (write-line (strcat "\n" (itoa num) tt "moved to layer " zz "."))))
 (princ))