 ; Lwt - change entity lineweight.
 ; Copyright 2004 by Rocket Software Ltd.
 ; Also contains Ln - set lineweights to bylayer (= none stored in entity.)
 ; Lwt needs to be able to look up the accepted lineweights, which are
 ; I think editable.  Maybe - if fixed then use a table.
 ; Plotting these things may also be difficult in model space.  Bozos.
 (DEFUN C:LWT (/ ss desp num enam entt)
  (if (setq ss (ssget))
      (progn
           (if (not (equal (type desult) 'INT)) (setq desult 1))
           (setq desp (getint (strcat "Desired entity lineweight <"
                                      (itoa desult)
                                      ">: ")))
           (if desp (setq desult desp))
           (setq num 0)
           (while (setq enam (ssname ss num))
                  (setq num (1+ num))
                  (setq entt (entget enam))
                  (cond ((setq sub (assoc 370 entt))
                         (entmod (subst (cons 370 desult) sub entt)))
                        ((/= desult 1)
                         (entmod (append entt (cons 370 desult))))))))
 (princ))

 (DEFUN C:LN (/ ss)
  (if (setq ss (ssget))
      (command ".change" ss "" "p" "lw" "bylayer" ""))
 (princ))

(princ)