I've asked this in the past and reviewed several other posts concerning this, but I just can't figure out how to make it work. I've written a routine that is to select a polygon, capture it's area, then create a string of text using that area. Here is what I have:
(defun c:sft (/ b1 p1 h1)
(setq b1 (entsel))
(command ".area" "e" b1)
(setq b1 (getvar "area"))
(setq p1 (getpoint "\nPick start point for CENTER Justified text: ")) (setq h1 (getdist "\nText height: ")) (command ".text" "j" "c" p1 h1 "0" b1) (princ)
)
The problem is that the value of b1 has 12 places to the right of the decimal and I would like it to have only two. Can someone please help me correct this?
Thank again for your help,
Jeff
(defun c:sft (/ b1 p1 h1)
(setq b1 (entsel))
(command ".area" "e" b1)
(setq b1 (getvar "area"))
(setq p1 (getpoint "\nPick start point for CENTER Justified text: ")) (setq h1 (getdist "\nText height: ")) (command ".text" "j" "c" p1 h1 "0" b1) (princ)
)
The problem is that the value of b1 has 12 places to the right of the decimal and I would like it to have only two. Can someone please help me correct this?
Thank again for your help,
Jeff