Skip to main content

Total Area Autocad Lisp Jun 2026

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

Name the file TotalArea.lsp . Ensure the file extension is .lsp and not .lsp.txt . Step 2: Load into AutoCAD Open your drawing in AutoCAD. Type in the command line and press Enter . Browse to the location where you saved TotalArea.lsp . Click the file, then click Load .

Copy the code below into Notepad and save it as TOTALAREA.LSP .

(defun C:AT ( / ss area_list total sf) (setq sf (getreal "\nConversion factor (1 drawing unit = ? feet): ")) (if (= sf nil) (setq sf 1.0)) (setq ss (ssget '((0 . "LWPOLYLINE,POLYLINE,CIRCLE,ELLIPSE,REGION")))) (if ss (progn (setq total 0.0) (repeat (setq i (sslength ss)) (setq ent (ssname ss (setq i (1- i)))) (setq area (vlax-curve-getArea ent)) (setq total (+ total area)) ) (setq total_sqft (* total sf sf)) (setq total_acres (/ total_sqft 43560.0)) (alert (strcat "Total Area: " (rtos total_acres 2 2) " Acres")) ;; Optional: Insert text (command "_.MTEXT" (getpoint "\nPick text insertion point: ") "J" "TL" "W" "0" (strcat "TOTAL AREA = " (rtos total_acres 2 2) " ACRES") "") ) (princ "\nNo objects selected.") ) (princ) )

It selects multiple closed objects (polylines, circles, rectangles, regions), reads their individual area properties, adds them together, and displays the sum. total area autocad lisp

) (princ) ; Clean exit )

;; 3. Check if the object has an 'Area' property (if (vlax-property-available-p obj 'Area) (progn (setq area_val (vlax-get-property obj 'Area)) (setq total (+ total area_val)) ) ) (setq idx (1+ idx)) )

While LISP is free and customizable, some professionals use specialized tools:

Keep in mind that:

Before diving into LISP, let’s acknowledge the pain points of vanilla AutoCAD:

Replace it with one of the following conversion options based on your project requirements: (setq totalArea (+ totalArea (/ area 1000000.0))) Use code with caution. From Inches to Square Feet: (setq totalArea (+ totalArea (/ area 144.0))) Use code with caution. Troubleshooting Common Issues

, this script calculates the total area of various selected objects and is often paired with the command for complex drawings. Area to Field (A2F): Another popular Lee Mac routine

Calculating the cumulative area of multiple objects is one of the most common tasks in drafting, estimating, and spatial planning. While standard AutoCAD commands like AREA or MEASUREGEOM work well for single shapes, they quickly become tedious when dealing with dozens of complex zones. : Type APPLOAD in AutoCAD, find your file, and click Load

You can enhance your LISP to subtract areas (e.g., courtyards from total building footprint) by selecting "negative" objects and subtracting from the sum.

Allows you to export the Area property of selected polylines to a table or Excel file and sum them up within that table. Conclusion

If you’ve ever spent an afternoon clicking through dozens of closed polylines, manually adding their areas in a calculator, you know the frustration of AutoCAD’s default AREA command. While functional for a single room or shape, it’s a productivity killer for large-scale projects like site plans, floor area ratios, or material takeoffs.

While simple summation is the core, you can achieve far more with a deeper understanding of LISP's capabilities: Ensure the file extension is

Back to the top