(defun C:export_katalog_test (/ bl deskription list-punct-ass-list list-strings n o-doc put-file squares style)
  ;экспортирует весь каталог в kml файл
  (if (setq o-doc(XML-Get-XMLObject (get-patch-to-katalog)))
    (progn
      (setq type-list(get-punct-type-list-in-katalog o-doc))
      (add-mggt-punct-types-in-drawning)
      (setq list-points-kontur (convert-safearray-to-list-points(vlax-variant-value(vla-get-Coordinates(vlax-ename->vla-object(car(entsel "\nВыбери линию: ")))))2))
      (setq squares(XML-Get-Child (XML-Get-Child o-doc nil "puncts") nil "squares"))
      (setq n 1)
      (setq nn 1)
      (foreach x (XML-Get-ChildList squares)
	(foreach y (XML-Get-ChildList x)
	  (setq punct-ass-list(convert-punkt-recorg-to-ass-list y))
	  (if
	    (analisis-point-in-contur list-points-kontur (list (atof(get-item-by-name-in-list punct-ass-list "E"))(atof(get-item-by-name-in-list punct-ass-list "N"))))
	    (progn
	      (draw-punkt-by-record y type-list)
	      (setq nn (1+ nn))
	      )
	    )
	  (if (=(rem n 100)0)(grtext -1 (strcat"читаю"(itoa n))))
	  (setq n (1+ n))
	  )
	)
      (grtext -1 "")
      (if squares(vlax-release-object squares))
      (if o-doc(vlax-release-object o-doc))
      (princ (strcat "\nНанесено " (itoa nn) " пунктов."))
      )
    (alert "Файл каталога координат пунктов не обнаружен!")
    )
  (princ)
  )