(defun C:gps_vedovisti (/ 2_points azimut dist h hard_point name-2-points name-hard-point vla-object
			list-measures list-str-itog list-str-kovalent n list-points list-str-points)
  ;создает текстовый файл с измерениями для ведомостей уравнивания gps наблюдений
  (if (setq hard_point (car(entsel "\nУкажи жесткую точку: ")))
    (progn
      (setq vla-object (vlax-ename->vla-object hard_point))
      (setq name-hard-point(vlax-get-property vla-object 'RawDescription))
      (setq hard_point(list (vlax-get-property vla-object 'easting)(vlax-get-property vla-object 'northing)(vlax-get-property vla-object 'elevation)))
      (setq list-points
	     (list(list
		    (list "name" name-hard-point)
		    (list "x" (nth 0 hard_point))
		    (list "y" (nth 1 hard_point))
		    (list "z" (nth 2 hard_point))
		    )))
      (while (setq 2_points (car(entsel "\nУкажи измеряемую точку[След.ж.т.]: ")))
	(setq vla-object (vlax-ename->vla-object 2_points))
	(setq name-2-points(vlax-get-property vla-object 'RawDescription))
	(setq 2_points(list (vlax-get-property vla-object 'easting)(vlax-get-property vla-object 'northing)(vlax-get-property vla-object 'elevation)))
	(setq list-measures
	       (append list-measures
		       (list
			 (list
			   (list "name-hard-point" name-hard-point)
			   (list "name-2-points" name-2-points)
			   (list "dist" (distance (list (nth 0 hard_point)(nth 1 hard_point)0.0)(list (nth 0 2_points)(nth 1 2_points)0.0)))
			   (list "azimut" (convert-rad-to-str-grad
					    (calculation_angle_be_3points
					      (list (nth 0 hard_point)(+(nth 1 hard_point)100.0)0.0)
					      (list (nth 0 hard_point)(nth 1 hard_point)0.0)
					      (list (nth 0 2_points)(nth 1 2_points)0.0))))
			   (list "h" (-(nth 2 hard_point)(nth 2 2_points)))
			   ))))
	(setq list-points
	       (append list-points
		       (list
			 (list
			   (list "name" name-2-points)
			   (list "x" (nth 0 2_points))
			   (list "y" (nth 1 2_points))
			   (list "z" (nth 2 2_points))
			   ))))
	(draw-line-vla-by-list-property
	  (list
	    (cons "spece" (if (eq (getvar "CTAB")"Model")model_spece paper_spece))
	    (cons "StartPoint" (list (nth 0 hard_point) (nth 1 hard_point) 0.0))
	    (cons "EndPoint" (list (nth 0 2_points) (nth 1 2_points) 0.0))
	    ))
	)
      (foreach x list-points
	(setq list-str-points
	       (append list-str-points
		       (list
			 (strcat
			   (cadr(assoc "name" x))
			   "\t"(rtos(cadr(assoc "y" x))2 3)
			   "\t"(rtos(get-rng-number 0.009 nil)2 3)
			   "\t"(rtos(cadr(assoc "x" x))2 3)
			   "\t"(rtos(get-rng-number 0.009 nil)2 3)
			   "\t"(rtos(cadr(assoc "z" x))2 3)
			   "\t"(rtos(get-rng-number 0.009 nil)2 3)
			   "\t\t"
			   ))))
	)
      (setq n 1)
      (foreach x list-measures
	(setq list-str-kovalent
	       (append list-str-kovalent
		       (list
			 (strcat
			   "B"(itoa n)"\t"(cadr(assoc "name-hard-point" x))"\t"(cadr(assoc "name-2-points" x))"\tАз.\t"(cadr(assoc "azimut" x))"\n"
			   "\t\t\tDВыс.\t"(rtos (cadr(assoc "h" x))2 2) "м\n"
			   "\t\t\tРасст.\t"(rtos (cadr(assoc "dist" x))2 2) "м"
			   ))))
	(setq list-str-itog
	       (append list-str-itog
		       (list
			 (strcat
			   "B"(itoa n)
			   "\t"(cadr(assoc "name-hard-point" x))
			   "\t"(cadr(assoc "name-2-points" x))
			   "\t"(rtos (cadr(assoc "dist" x))2 2) "м"
			   ))))
	(setq n (1+ n))
	)
      (file_write_list_to_file 
	(strcat
	  (getvar "DWGPREFIX")
	  (substr (getvar "DWGNAME") 1 (-(strlen (getvar "DWGNAME"))4))
	  "_.txt"
	  )
	(append list-str-points list-str-kovalent list-str-itog)
	)
      )
    )
  (princ)
  )