(defun C:export_polyline_to_plt ( / 2dpline_vla n pline spisok datum-property last-point list-point list-str put-output-file)
  ; выводит каталог координат полилинии в таблицу
  (load_global_variable)
  (setq list-str(list
		  "OziExplorer Track Point File Version 2.1"
		  "WGS 84"
		  "Altitude is in Feet"
		  "Reserved 3"
		  "0,2,255,_,0,0,2,8421376"
		  "0"))
  (initget 1)(setq pline (car (entsel "\nВыбери полилинию: ")))
  (cond
    ((eq pline nil)
     (alert "Ничего не выбрано!"))
    ((not(eq (cdr(assoc 0 (entget pline))) "LWPOLYLINE"))
     (alert "Выбрана не 2D полилиния!"))
    ((eq (cdr(assoc 0 (entget pline))) "LWPOLYLINE")
     (setq datum-property (dialog-print_to_png_area))
     (setq 2Dpline_vla (vlax-ename->vla-object pline))
     (setq spisok (extract_coord_lwpolyline (entget pline)))
     (setq list-point (convert-xy-to-bl-wgs-84-by-property datum-property (nth 0 spisok)))
     (setq last-point (list (strcat (rtos(nth 0 list-point)2 12)","(rtos(nth 1 list-point)2 12)",0,0,,,")))
     (foreach x spisok
       (setq list-point (convert-xy-to-bl-wgs-84-by-property datum-property x))
       (setq list-str(append list-str (list (strcat (rtos(nth 0 list-point)2 12)","(rtos(nth 1 list-point)2 12)",0,0,,,"))))
       )
     (if (eq :vlax-true (vla-get-Closed 2Dpline_vla))
       (setq list-str(append list-str last-point)))
     (setq put-output-file (strcat
			    (getvar "DWGPREFIX")
			    (substr (getvar "DWGNAME") 1 (-(strlen (getvar "DWGNAME"))4))
			    ".plt"
			    ))
     (if (setq put-output-file (getfiled "Имя сохраняемого файла..." put-output-file "plt" 1))
       (file_write_list_to_file put-output-file list-str)
       )
     )
    )
  (princ)
  )