(defun C:export_table_to_txt_PNEZD_file ( / list-result n perffix puttxtfile spisok table_obj test_str)
  
  (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))
  (foreach list_shel spisok
    (setq list-result
	   (append list-result
		   (list
		     (strcat
		       (edit_str_trim_for_nunber_symbols
			 (vl-string-translate "," "."
			   (edit_translit_str
			     (strcat
			       (if(nth 0 list_shel)
				 (nth 0 list_shel)
				 "")
			       )
			     )
			   )
			 15
			 nil)
		       ","
		       (nth 2 list_shel)
		       ","
		       (nth 3 list_shel)
		       ","
		       "0.000"
		       ","
		       (if(nth 1 list_shel)
			 (nth 1 list_shel)
			 "")
		       ))
		   )))
  
  (if(setq putTXTfile (getfiled "Имя сохраняемого файла..." (strcat(getvar "DWGPREFIX")(substr (getvar "DWGNAME") 1 (-(strlen (getvar "DWGNAME"))4)) "_" perffix) "txt" 1))
  (file_write_list_to_file putTXTfile list-result))
  (princ)
  )