(defun C:dialog	()
  (setvar "cmdecho" 0)
  (sub_dialog)
  (if ss (dcl_dialog))
  (prin1)
)
(defun sub_dialog ()
  (setq ss (ssget))
  (if (null ss)(setq ss (ssadd)))
  (setq	cir_num	0 line_num 0 text_num 0)
  (setq n 0)
  (repeat (sslength ss)
    (setq en (ssname ss n))
    (setq entype (cdr (assoc 0 (entget en))))
    (cond ((= entype "CIRCLE") (setq cir_num (+ 1 cir_num)))
	  ((= entype "LINE") (setq line_num (+ 1 line_num)))
	  ((= entype "MTEXT") (setq text_num (+ 1 text_num)))
    )
    (setq n (+ 1 n))
  )
)
(defun dcl_dialog ()
  (setq	dcl_id (load_dialog "dia"))
	(new_dialog "dia" dcl_id)
	 (set_tile "11" (itoa cir_num))
	(set_tile "22" (itoa line_num))
	 (set_tile "33" (itoa text_num))
  )
