(defun C:del-dubl-points ( / nabor current_obj flag-1 flag-2 n next-point dist list-dist big_list-dist)
  (setq nabor(ssget "_X" '((0 . "POINT"))))
  (if nabor
    (progn
      (setq nabor(convert_ss_to_list nabor))
      (setq n 0)
      (while (not flag-1)
;;;	(grtext -1 (strcat"#"(itoa n)))(princ"#")(princ n)(terpri)
	(setq current_obj (nth n nabor))
	(setq next-point (1+ n))
	(if (< next-point (1-(length nabor)))
	  (progn
	    (setq list-dist nil)
	    (while (not flag-2)
	      (setq dist (distance (get-point-by-ent-obj current_obj) (get-point-by-ent-obj (nth next-point nabor))))
	      (setq list-dist (append list-dist (list (rtos dist 2 3))))
	      (if (< dist 0.05)
		(progn
		  (princ n)(princ"Y")(terpri)
;;;		(princ"Y")(princ (distance (get-point-by-ent-obj current_obj) (get-point-by-ent-obj (nth next-point nabor))))(terpri)
		(entdel (nth next-point nabor))
		  (setq nabor(edit-list-del-item-by-number next-point nabor))
		  )
		(progn
;;;		(princ"N")(princ (distance (get-point-by-ent-obj current_obj) (get-point-by-ent-obj (nth next-point nabor))))(terpri)
		  (setq next-point (1+ next-point))
		  )
		)
	      (if (> next-point (1-(length nabor))) (setq flag-2 T))
	      )
	    (setq flag-2 nil)
	    )
	  )
	(file_write_list_to_file (strcat "d:\\"(itoa n)".txt") (acad_strlsort list-dist))
	(setq big_list-dist (append big_list-dist list-dist))
	(setq n (1+ n))
	(if (> n (1-(length nabor))) (setq flag-1 T))
	)
      )
    )
  (file_write_list_to_file "d:\\big_list.txt" (acad_strlsort big_list-dist))
;;;  (princ (length nabor))
  (princ)
  )

(defun get-point-by-ent-obj (obj / point)
  (setq point (cdr (assoc 10 (entget obj))))
  (list (nth 0 point)(nth 1 point) 0.0)
  )