The raw output of the Lisp is in drawing units . In AutoCAD, one drawing unit can represent 1 millimeter, 1 inch, 1 meter, or 1 foot. This depends on your template.
LISP (LISt Processing) is a programming language embedded in AutoCAD since version 2.1. It allows you to automate repetitive tasks. A "Total Area LISP" is a script that: total area autocad lisp
(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 The raw output of the Lisp is in drawing units
, 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 LISP (LISt Processing) is a programming language embedded
(repeat (setq i (sslength ss)) ... )