(vl-load-com)
(defun c:area1 (/ adoc ent_last ent_prev pt)
(vla-startundomark (setq adoc (vla-get-activedocument (vlax-get-acad-object))))
(if (and (setq ent_prev (entlast))
(vl-cmdf "_.-boundary" pause "")
(setq ent_last (entlast))
(not (equal ent_prev ent_last))
(= (type
(setq pt (vl-catch-all-apply (function (lambda () (getpoint "\nТочка вставки текста <Отмена> : ")))))
) ;_ end of type
'list
) ;_ end of =
pt
) ;_ end of and
(progn (entmakex (list '(0 . "TEXT")
'(100 . "AcDbEntity")
'(100 . "AcDbText")
(cons 10 pt)
'(40 . 2.5)
(cons 1 (rtos (vla-get-area (vlax-ename->vla-object ent_last)) 2 2))
'(50 . 0.0)
'(41 . 1.0)
'(51 . 0.0)
'(71 . 0)
'(72 . 0)
'(11 0.0 0.0 0.0)
'(210 0.0 0.0 1.0)
'(100 . "AcDbText")
'(73 . 0)
) ;_ end of list
) ;_ end of entmakex
;(entdel ent_last)
) ;_ end of progn
) ;_ end of if
(vla-endundomark adoc)
(princ)
) ;_ end of defun
(defun c:area_multi (/ adoc ent_prev ent_last area pt)
(vla-startundomark (setq adoc (vla-get-activedocument (vlax-get-acad-object))))
(setq area 0.)
(while (and (setq ent_prev (entlast))
(vl-cmdf "_.-boundary" pause "")
(setq ent_last (entlast))
(not (equal ent_prev ent_last))
) ;_ end of and
(progn (setq area (+ area (vla-get-area (vlax-ename->vla-object ent_last))));(entdel ent_last))
) ;_ end of while
(if (and (= (type
(setq pt (vl-catch-all-apply (function (lambda () (getpoint "\nТочка вставки текста <Отмена> : ")))))
) ;_ end of type
'list
) ;_ end of =
pt
) ;_ end of and
(entmakex (list '(0 . "TEXT")
'(100 . "AcDbEntity")
'(100 . "AcDbText")
(cons 10 pt)
'(40 . 2.5)
(cons 1 (rtos area 2 2))
'(50 . 0.0)
'(41 . 1.0)
'(51 . 0.0)
'(71 . 0)
'(72 . 0)
'(11 0.0 0.0 0.0)
'(210 0.0 0.0 1.0)
'(100 . "AcDbText")
'(73 . 0)
) ;_ end of list
) ;_ end of entmakex
) ;_ end of if
(vla-endundomark adoc)
(princ)
) ;_ end of defun