(defun C:convert-txt-and-points-to-cogo-point (/ CIR-LIST LIST-CIR LIST-DIST LIST-TXT N SSNABOR-CIR SSNABOR-TXT TXT-LIST list-points)
  (setq ssnabor-txt (ssget "_X"(list (cons 0 "TEXT")(cons 8 "_old_Пикеты отметки"))))
  (setq ssnabor-cir (ssget "_X"(list (cons 0 "POINT")(cons 8 "_old_Пикеты маркеры"))))
  (setq txt-list (convert_ss_to_list ssnabor-txt))
  (setq cir-list (convert_ss_to_list ssnabor-cir))
  (foreach x txt-list
    (setq list-txt (append list-txt (list (entget x))))
    )
  (foreach x cir-list
    (setq list-cir (append list-cir (list (entget x))))
    )
  (setq n 1)
  (foreach x list-cir
    (name-file-to-messege (itoa n))
    (setq list-dist nil)
    (foreach y list-txt
      (setq list-dist (append list-dist (list (distance (cdr(assoc 10 x)) (cdr(assoc 10 y))))))
      )
    (setq list-points (append list-points (list (convert-list-to-string-be-delimiter
						(list (itoa n)
						      (rtos (nth 1 (cdr(assoc 10 x)))2 3)
						      (rtos (nth 0 (cdr(assoc 10 x)))2 3)
						      (cdr(assoc 1(nth (vl-position (apply 'min list-dist)list-dist)list-txt)))"")
						","))))
;;;    (draw-lwpolyline-vla-by-list-property
;;;      (list(cons "spece" (if (eq (getvar "CTAB")"Model")model_spece paper_spece))
;;;	   (cons "Coordinates" (list (cdr(assoc 10(nth (vl-position (apply 'min list-dist)list-dist)list-txt)))(cdr(assoc 10 x))))
;;;	   (cons "Color" 1)
;;;	   ))
    (command "_erase" (nth (vl-position (apply 'min list-dist)list-dist)list-txt) "")
    (setq n (1+ n))
    )
  (file_write_list_to_file (strcat(getvar "DWGPREFIX")"result.txt") list-points)
  (delete-name-file-to-messege)
  (princ)
  )