 ; Get: Get entity data.
 ; Getx: Get entity data and extended entity data.
 ; Copyright 1991, 2007 by Rocket Software Ltd.
 ; Get at those deeper levels of reality
 ;         or totally lose contact with the stuff,
 ;                     depending on your perspective...
 (DEFUN C:GETX (/ nst aa bb ntt exdat)
  (if (/= (type st) 'ENAME)
      (progn
            (while (null aa)
            (setq aa (entsel "Select entity:")))
            (print (entget (setq st (car aa))))
            (princ)
            (setq bb (entget st (list "*")))
            (if (setq exdat (assoc -3 bb))
                (print exdat)
                (write-line "\nNo extended data found.")))
      (progn
            (redraw st)
            (setq nst (car (entsel "Select entity or <Return> for next.")))
            (if nst
                (progn
                     (setq st (cdar (print (entget nst))))
                     (princ)
                     (setq bb (entget st (list "*")))
                     (if (setq exdat (assoc -3 bb))
                         (print exdat)
                         (write-line "\nNo extended data found.")))
                (progn
                     (if (setq ntt (entnext st))
                         (progn
                              (setq st (cdar (print (entget ntt))))
                              (princ)
                              (setq bb (entget st (list "*")))
                              (if (setq exdat (assoc -3 bb))
                              (print exdat)
                              (write-line "\nNo extended data found."))
                              (redraw st 3))
                         (write-line "There are no more entities."))))))
 (princ))

 (DEFUN C:GET (/ nst aa ntt)
  (if (/= (type st) 'ENAME)
      (progn
            (while (null aa)
            (setq aa (entsel "Select entity:")))
            (print (entget (setq st (car aa)))))
      (progn
            (redraw st)
            (setq nst (car (entsel "Select entity or <Return> for next.")))
            (if nst
                (setq st (cdar (print (entget nst))))
                (progn
                      (if (setq ntt (entnext st))
                          (progn
                                (setq st (cdar (print (entget ntt))))
                                (redraw st 3))
                          (write-line "There are no more entities."))))))
 (princ))