 ; DDX - call the appropriate command to edit either text, attdefs, or inserts.
 ; Copyright 1995, 1999 by Rocket Software.
 ; Donald Duck Ears - another failure of product development.
 (DEFUN C:DDX (/ enampt entt typp)
  (setq enampt (entsel "Select anything textlike: "))
  (if enampt
      (progn
           (setq typp (cdr (assoc 0 (entget (setq enam (car enampt))))))
           (cond ((or (= typp "TEXT")
                      (= typp "MTEXT")
                      (= typp "DIMENSION")
                      (= typp "ATTDEF"))
                  (command "ddedit" enam))
                 ((= typp "INSERT")
                  (command "ddatte" enam))
                 (T
                  (write-line "\nText, please!."))))
      (write-line "\nNothing selected."))
 (princ))