(defun C:export_table_to_coord_file ( / n table_obj test_str spisok putTXTfile putSDR33file x com_list perffix)
(geo_tools-help "export_table_to_coord_file")
  (initget 1)(setq table_obj (car (entsel "\nВыбери существующую таблицу с координатами: ")))
  (setq table_obj (vlax-ename->vla-object table_obj))
  (setq n 2)
  (while (not(eq n (vla-get-rows table_obj)))
    (setq test_str (vla-GetText table_obj n 0 ))
    (if (not (eq test_str ""))
      (if (wcmatch (substr test_str 1 1) "#")
	(progn
	  (setq spisok
		 (append spisok
			 (list (list
				 (vla-GetText table_obj n 0 )
				 (vla-GetText table_obj n 1 )
				 (vla-GetText table_obj n 2 )
				 (vla-GetText table_obj n 3 )
				 ))))
	  )
	)
      )
    (setq n (1+ n))
    )
  (setq perffix(vla-GetText table_obj 0 0))
  (setq com_list(dialog-export-table-to-coord-file perffix spisok))
  (if com_list (file-write-coord-list com_list spisok perffix))
;;;  (if com_list
;;;    (progn
;;;      (setq putTXTfile(strcat(getvar "DWGPREFIX")(substr (getvar "DWGNAME") 1 (-(strlen (getvar "DWGNAME"))4)) "_" perffix))
;;;      (cond
;;;	((eq (nth 10 com_list) "0")
;;;	(setq putSDR33file (getfiled "Имя сохраняемого файла..." putTXTfile "txt;lst" 1)))
;;;	((eq (nth 10 com_list) "1")
;;;	(setq putSDR33file (getfiled "Имя сохраняемого файла..." putTXTfile "sdr" 1)))
;;;	((eq (nth 10 com_list) "2")
;;;	(setq putSDR33file (getfiled "Имя сохраняемого файла..." putTXTfile "gsi" 1)))
;;;	)
;;;      (setq SDR33file (open putSDR33file "w"))
;;;      (mapcar '(lambda (x)(write-line(edit-list-to-strcat com_list x perffix)SDR33file))
;;;	      spisok)
;;;      (close SDR33file)
;;;      )
;;;    )
  (princ)
  )