;;;Label the area of a closed polyline in ac., sq. yds., sq. ft. ;;;in either Acres, Square Yards or Square Feet. ;;;(It will also label open polylines according to the area ;;;that AutoCAD returns for them.) All polylines to be measured ;;;for area should be closed to ensure the values obtained are ;;;actually the area intended. ;;; ;;;> Author: Henry C. Francis ;;;> 425 N. Ashe St. ;;;> Southern Pines, NC 28387 ;;;> http://paracadd.com ;;;> All rights reserved. ;;; ;;;> COPYRIGHT: 2-4-92 ;;;> EDITED: 11-20-1997 ;;; (DEFUN C:AL ( / chose ufac lstr ent1 alab ip1) (setvar "cmdecho" 0) (if dimscl nil (load"dimscl")) (dimscl) (setq atxht (* dimsc 0.09) txht (getvar"textsize") );setq (if getstyle (getstyle "A")(progn (load "getstyle")(getstyle "A"))) (setq chose (ukword 0 "Acres, square Yards, square Feet" "Select Units: Acres, square Yards or square Feet ? " "Acres") );setq (if (eq (substr chose 1 1)"A") (setq ufac 43560.0 lstr " AC.") (if (eq (substr chose 1 1) "Y") (setq ufac 9.00 lstr " SY.") (if (eq (substr chose 1 1) "F") (setq ufac 1.00 lstr " SF.") );if );if );if (setq elbl (ukword 0 "Yes, No" "Label contour elevation ? (Yes or No)" elbl) );setq (while (setq ent1 (entsel "\nSelect entity for Area: ")) (if (eq (substr elbl 1 1) "Y") (setq eltxt (strcat "EL. "(rtos (car (cdddr (assoc 10 (entget (car ent1)))))))) (setq eltxt "") );if (command "area" "e" ent1) (setq alab (strcat (rtos (/ (getvar"area") ufac )) lstr)) (setq ip1 (getpoint "\nText insertion point: ")) (setq ip2 (list (car ip1)(-(cadr ip1)(* atxht 1.5))(caddr ip1))) (command ".text" ip1 atxht 0 alab ".text" ip2 atxht 0 eltxt );command );while (setvar "textsize" txht) (getstyle "") (setvar "cmdecho" 1) (command) );defun