(defun c:blockliste (/ datei block objekt)
  (setq datei (open (strcat (getvar "DWGNAME") ".BLK") "w"))
  (setq block (tblnext "BLOCK" t))
  (while block
    (print block datei)
    (setq objekt (cdr (assoc -2 block)))
    (while objekt
      (print (entget objekt) datei)
      (setq objekt (entnext objekt))
    )
    (setq block (tblnext "BLOCK"))
  )
  (close datei)
  (princ)
)
