;-----------------------------
; Text exportieren 30.6.91 AW
; eingabaut in e3f8
;------------------------------
(Defun C:Export ()
  (Setvar "Cmdecho" 0)
  (Setq A (Getstring "\nDateiname: "))
  (Setq B (Open A "r"))
  (If
     B
      (Progn
        (Princ "\nDatei existiert bereits.")
        (Close B)
        (Initget "J N")
        (Setq X (Getkword "\nSoll sie berschrieben werden? <N> "))
        (If
          (= X "J")
            (Write-it)
        )
      )
      (Write-it)
  )
  (Princ)
)

(Defun Write-it ()
  (Setq C (Open A "w"))
  (Prompt "\nDatei ge”ffnet.")
  (Prompt "\nTexteintr„ge der Reihe nach w„hlen: ")
  (Setq D 0)
  (Setq E (Ssget))
  (Setq F (Sslength E))
  (Repeat F
    (Setq G (Ssname E D))
    (Setq H (Entget G))
    (Setq I (Cdr (Assoc 1 H)))
    (Write-line I C)
    (Setq D (+ 1 D))
  )
  (Close C)
)
