Total Area Autocad Lisp [top] -

: If you plan to change the room sizes later, use a routine that inserts a Field instead of static text so the total updates automatically.

require selecting objects one by one, a LISP routine allows for a single selection of dozens or hundreds of entities to get an instant total. Autodesk Community, Autodesk Forums, Autodesk Forum Common Total Area LISP Routines total area autocad lisp

(defun C:TOTALAREA (/ ss total-area obj-list obj area obj-name cnt *error* old-cmdcho old-dimzin) : If you plan to change the room

(defun c:TOTALAREA (/ ss i ent area total) (setq total 0) (princ "\nSelect closed objects (Polylines, Circles, Hatches): ") (if (setq ss (ssget '((0 . "LWPOLYLINE,POLYLINE,CIRCLE,HATCH")))) (progn (repeat (setq i (sslength ss)) (setq ent (ssname ss (setq i (1- i)))) (command "._area" "_O" ent) (setq total (+ total (getvar "AREA"))) ) (princ (strcat "\nTotal Area: " (rtos total 2 2))) ) (princ "\nNo valid objects selected.") ) (princ) ) Use code with caution. Copied to clipboard How to Use the LISP total area autocad lisp

command, specifically designed to display areas in square meters ( ) instantly. How to Create Your Own Routine