calculate area base on dimension (cotation)

Is it possible to create a lisp routine to calculate the area base on 2 dimension, the text itself (lineardimension) and not the line, and show the result in a text format place in the drawing?

i tryied this but doesn't work.... i can select the dimension but doesn't do the math


(defun c:test (/sq dim1 dim2)
(setq dim1 (entsel "\\n select dimension 1 for area:"))
(setq dim2 (entsel "\\n select dimension 2 for area:"))
sq (* dim1 dim2)
(setq p2(getpoint"\\nselect text insertion point"))
(command"text"p2"2""0" (rtos (/ sq 144))))
(princ)
)

thank you for your help