Skip to main content

Total Area Autocad Lisp Official

Save this as TOTALAREA.LSP and load it with APPLOAD :

In AutoCAD, calculating the total area of multiple objects—like polylines, circles, or regions—can be tedious if done manually using the standard AREA command. AutoLISP routines automate this by summing the areas of all selected objects and displaying the result instantly. total area autocad lisp

Displays the total area of selected circles, ellipses, polylines, and splines at the command line. Lee Mac Programming Save this as TOTALAREA

;; Alternative: Quick total area with selection window (defun C:TAQ ( / ss total area obj) (setq ss (ssget '((0 . "CIRCLE,ARC,ELLIPSE,LWPOLYLINE,POLYLINE,REGION,HATCH")))) (setq total 0.0) (if ss (repeat (setq i (sslength ss)) (setq obj (vlax-ename->vla-object (ssname ss (setq i (1- i))))) (if (vlax-property-available-p obj "Area") (setq total (+ total (vla-get-area obj))) ) ) ) (princ (strcat "\nTotal Area = " (rtos total 2 2))) (princ) ) Lee Mac Programming ;; Alternative: Quick total area

: Type APPLOAD in AutoCAD, find your file, and click Load . To keep it permanently, add it to your Startup Suite .

Here’s what my custom TLA (Total Area) routine does: