(defun C:CT ()
(setvar "cmdecho" 0)
(setvar "DIMZIN" 0)
(COMMAND "LAYER" "m" "A-00-COTA_NIV" "T"
"A-00-COTA_NIV" "S" "A-00-COTA_NIV" ""
)
(setq sc (getreal "\nscale ? "))
(setq P (getint "\nhow many decimal ? "))
(setq a "T")
(setq r 0)
(while a
(setq pt1 (getpoint "\npoint (NA) ? : "))
(setq pt2 (getpoint "\npoint (NO) ? : "))
(if (= pt1 pt2 nil) (set a nil))
(progn
(setq y1 (cadr pt1))
(setq y2 (cadr pt2))
(setq aa (atof (rtos y1 2 P)))
(setq aa1 (atof (rtos y2 2 P)))
(if (> aa 0)
(progn
(setq yy (strcat "+" (rtos y1 2 P) " (NA)"))
)
)
(if (> aa1 0)
(progn
(setq yy1 (strcat "+" (rtos y2 2 P) " (NO)"))
)
)
(if (< aa 0)
(progn
(setq yy (strcat (rtos y1 2 P) " (NA)"))
)
)
(if (< aa1 0)
(progn
(setq yy1 (strcat (rtos y2 2 P) " (NO)"))
)
)
(if (= pt1 nil) (setq yy " "))
(if (= pt2 nil) (setq yy1 " "))
);progn
(command "insert" "nivel_corte_na+no" pt1 sc "" r yy yy1)
(setvar "cmdecho" 1)
);while
);defun
______________________________________________
but the part of just writing one of the two pt1 whether it be pt1 or pt2 is not working.
someone can help me, I think it must be a simple thing, but I'm not getting it