Total Area Autocad Lisp [upd] -

(defun C:TLA (/ ss total area obj name) (setq ss (ssget '((0 . "LWPOLYLINE,CIRCLE,ELLIPSE,HATCH,REGION")))) (if (= ss nil) (princ "\nNo valid objects selected.") (progn (setq total 0) (repeat (setq i (sslength ss)) (setq obj (ssname ss (setq i (1- i)))) (setq area (vlax-curve-getArea obj)) (setq total (+ total area)) ) (princ (strcat "\n--- TOTAL AREA ---" "\nSquare feet: " (rtos total 2 2) "\nSquare meters: " (rtos (* total 0.092903) 2 2) "\nAcres: " (rtos (/ total 43560) 2 3) "\nSquare yards: " (rtos (/ total 9) 2 2))) ) ) (princ) )

Measures total area of many objects at once and reports the total to the command line. JTB World Calculates total area and sums it specifically by layer. CADTutor AMO total area autocad lisp

;; Example: If drawing units are millimeters, show square meters ;; (princ (strcat "\nSquare meters: " (rtos (/ total 1000000.0) 2 prec))) (defun C:TLA (/ ss total area obj name) (setq ss (ssget '((0