Regards @Mabwys
Maybe this change will help.
; inserts increasing numbers inside hexagon
(defun c:nmp (/ p n ni ts oecho ds th txt na)
;;; (if (= 0 (getvar "dimscale"))
;;;;;; (setq ds 1.0)
;;;;;; (setq ds (getvar "dimscale"))
;;; )
;;; (setq th (getvar "dimtxt"))
(setq th(getreal"\nEnter text height...:"))
;;; (setq txt (* th ds))
(setq txt th)
(setq ts txt)
(if nn (setq nn (fix nn))(setq nn 1))
(if (= nn 0)(setq nn 1))
(princ "\n Increment by < ")
(princ nn)
(princ " >? : ")
(setq ni (getint))
(if (= ni nil)(setq ni nn)(setq nn ni))
(if np
()
(setq np 1)
)
(princ "\n Start or continue with number < ")
(princ np)
(princ " >? : ")
(setq n (getint))
(if (= n nil)
(setq n np)
(setq np n)
)
(setq p (getpoint "\n Number location: "))
(setq oecho (getvar "cmdecho"))
(setvar "cmdecho" 0)
(while p
(setq na (itoa n))
(entmake (list (cons 0 "TEXT")
(cons 10 p)
(cons 11 p)
(cons 1 na); actual text
(cons 7 (getvar "TEXTSTYLE"))
(cons 40 txt)
(cons 72 4)
)
)
(if (> n 99)
(command "polygon" "8" p "c" (* ts 142.5))
(command "polygon" "8" p "c" (* ts 120)))
(setq p (getpoint "\n Next number location: ")
n (+ ni n)
np n
)
)
(setvar "cmdecho" oecho)
(princ)
)
(princ "\n Type > NMP < to insert numbers inside hexagon")
Carlos Calderon G

>Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.