(defun C:tab_file_by_numenklature2000 (/ file-name insert-point list_files)
  ; создание .tab файла растра (МСК-Саратов М1:2000) по номенклатуре
  (defun create-tab-file (input-point file_ / ne nw se)
    (setq nw (mapcar '+ input-point (list 0.0 1000.0)))
    (setq ne (mapcar '+ input-point (list 1000.0 1000.0)))
    (setq se (mapcar '+ input-point (list 1000.0 0.0)))
    (file_write_list_to_file (strcat (vl-filename-directory file_) "\\" (vl-filename-base file_) ".tab")
      (list
	"!table"
	"!version 300"
	"!charset WindowsCyrillic"
	""
	"Definition Table"
	(strcat "File \"" (vl-filename-base file_) ".tif"  "\"")
	"Type \"RASTER\""
	(strcat"("(rtos (nth 1 input-point)2 3)","(rtos (nth 0 input-point)2 3)") (0,0) Label \"SW\",");insert-point
	(strcat"("(rtos (nth 1 nw)2 3)","(rtos (nth 0 nw)2 3)") (5906,0) Label \"NW\",")
	(strcat"("(rtos (nth 1 ne)2 3)","(rtos (nth 0 ne)2 3)") (5906,5906) Label \"NE\",")
	(strcat"("(rtos (nth 1 se)2 3)","(rtos (nth 0 se)2 3)") (0,5906) Label \"SE\"")
	"CoordSys NonEarth Units \"m\""
	"Units \"m\""
	))
    )
  (setq list_files (file_find_be_extension "d:\\002k\\tif" "tif"))
  (foreach file list_files
    (setq file-name (vl-filename-base file))
    (setq insert-point (get-point-by_numenklature2000 file-name))
    (create-tab-file insert-point file)
    )
  (princ)
  )