  ;  LT - Change linetypes by object pick.
  ;  Copyright 1990   Rocket Software
  ;  When your <Return> button wears out from the change command...
 (DEFUN C:LT ( / tt zz ss num aa obj xx)
   (command "undo" "mark")
   (write-line "Pick lines to change:")
   (if (setq ss (ssget))
       (progn
             (if (setq tt (entsel "Select a line of the desired type:"))
                 (progn
                       (setq zz (assoc 6 (entget (car tt))))
                       (if (null zz) (setq zz (cons 6 "CONTINUOUS")))
                       (setq num 0)
                       (while (setq aa (ssname SS 0))
                              (setq obj (entget aa))
                              (if (setq xx (assoc 6 obj))
                                  (entmod (subst zz xx obj))
                                  (progn
                                        (setq s (list (cons 6 (cdr zz))))
                                        (entmod (append obj s))))
                              (ssdel aa ss)
                              (setq num (1+ num)))
                       (if (= num 1)
                           (setq tt " line ") (setq tt " lines "))
                           (write-line (strcat "\n" (itoa num) tt 
                           "changed to " (cdr zz) "."))
                       (setq ss nil))
           (write-line "\nNo linetype source entity selected, you ninny.")))
           (write-line "\nNo entities selected."))
 (PRINC))