Hello everyone! I have a lisp routine here that computes and displays the area of a polygon. My problem is it shows no comma for areas above 999. Can someone help me how to improve this lisp routine? Thanks in advance.
(defun c:LAR ( / sz o1 ipt opp parea h)
(while
(setq clyer(getvar"clayer"))
(command "layer" "m" "Boundary for Area" "")
(command "layer" "c" "4" "Boundary for Area" "")
(command "layer" "p" "n" "Boundary for Area" "")
(command "color" "bylayer")
(setq ipt (getpoint "\n Select Internal Point of Lot: "))
(command "-Boundary" ipt"" "")
(setq o1 (entlast))
(redraw o1 3)
(command "area" "O" "L")
(setq opp (getvar "area"))
(initget 1)
(setq parea(getpoint"\n Select insertion point"))
(command "layer" "m" "Area Text" "")
(command "layer" "c" "81" "Area Text" "")
(command "color" "bylayer")
(initget 1)
(command "regen")
(command "text" parea "" (strcat "A=" (rtos opp 2 0) " Sq.m."))
(setvar"clayer"clyer)
)
)