Sorry for the delay .. got a bit busy and needed to rewrite most of that other code ... please double check the numbers!
(defun c:ild (/ a flg p s)
;; RJP » 2020-08-17
(or *emspc* (setq *emspc* 18.))
(or *rowspc* (setq *rowspc* 12.))
(or *eflow* (setq *eflow* 0.77))
(setq *emspc*
(cond
((getint (strcat "\nEnter emitter spacing in tubing (inches):<" (rtos *emspc* 2 1) ">")
)
)
(*emspc*)
)
)
(setq *rowspc*
(cond
((getint (strcat "\nEnter spacing between rows (inches):<" (rtos *rowspc* 2 1) ">"))
)
(*rowspc*)
)
)
(setq *eflow* (cond ((getint (strcat "\nEnter emitter flow (gph):<" (rtos *eflow* 2 2) ">")))
(*eflow*)
)
)
(setq flg (> (getvar 'lunits) 2))
(if (setq s (ssget '((0 . "*POLYLINE,CIRCLE,REGION,ELLIPSE,SPLINE"))))
(foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s)))
(redraw e 3)
(setq a (vlax-curve-getarea e))
;; This portion could be updated to insert the text in the center of the bounding box if you'd like ( no picking required )
(if (setq p (getpoint "\nPick a point to place text: "))
(entmake (list '(0 . "MTEXT")
'(100 . "AcDbEntity")
'(67 . 0)
'(8 . "InlineDripNumbers")
'(100 . "AcDbMText")
(cons 10 p)
;; Adjust text height here
(cons 40 (getvar 'textsize))
'(71 . 5)
(cons 1
(strcat "AREA (SQ FT): "
(rtos a (getvar 'lunits) 2)
"\\PFLOW (GPM): "
(rtos (* (/ (* a
(if flg
1.
144.
)
)
(* *emspc* *rowspc*)
)
(/ *eflow* 60.)
)
2
2
)
)
)
'(11 1. 0. 0.)
'(43 . 0.125)
'(50 . 0.)
)
)
)
(redraw e 4)
)
)
(princ)
)
(vl-load-com)