(defun c:coordenadas()
(command "LAYER" "m" "CUADRICULA" "c" "9" "" "")
(terpri)(setq p1 (getpoint "INGRESE VERTICE 1:"))
(terpri)(setq p2 (getpoint "INGRESE VERTICE 2:"))
(terpri)(setq ancho (getreal "INGRESE ANCHO CUADRICULA:"))
(terpri)(setq ht (getreal "INGRESE ALTURA TEXTO:"))
(terpri)
(initget "Lineas")
(setq op (getkword "Escoja Tipo de cuadricula (Linea) ?"))
(if (= op "Cruz")
(setq fc (getreal "INGRESE FACTOR CRUZ (USE 2 PARA 1/1000):"))
)
(command "style" "" "" ht "" "" "" "" "")
(setq xmin (min (car p1) (car p2)))
(setq ymin (min (cadr p1) (cadr p2)))
(setq xmax (max (car p1) (car p2)))
(setq ymax (max (cadr p1) (cadr p2)))
(command "pline" p1 (list (car p1) (cadr p2)) p2 (list (car p2) (cadr p1)) "c")
(command "change" "l" "" "P" "C" "8" "")
(setq ix1 (+ (* (fix (/ xmin ancho)) ancho) ancho))
(setq ix2 (* (fix (/ xmax ancho)) ancho))
(setq iy1 (+ (* (fix (/ ymin ancho)) ancho) ancho))
(setq iy2 (* (fix (/ ymax ancho)) ancho))
(setq ix ix1)
(while (<= ix ix2)
(setq iy iy1)
(while (<= iy iy2)
(setq tex (strcat (rtos iy 2 0) "N"))
(command "text" (list (+ ix 1.0) (+ iy 1.0)) '0.0 tex)
(setq tex (strcat (rtos ix 2 0) "E"))
(command "text" (list (- ix 1.0) (+ iy 1.0)) '90.0 tex)
(setq iy (+ iy ancho))
)
(setq ix (+ ix ancho))
)
(if (= op "Cruz")
(c:Cruz)
(c:Lineas)
)
(terpri)
(setq oldech (getvar "cmdecho"))
(setq oldbl (getvar "blipmode"))
(setvar "cmdecho" 1)
(setvar "blipmode" 1)
(setvar "cmdecho" oldech)
(setvar "blipmode" oldbl)
)
(defun c:lineas()
(setq ix1 (+ (* (fix (/ xmin ancho)) ancho) ancho))
(setq ix2 (* (fix (/ xmax ancho)) ancho))
(setq iy1 (+ (*