Once you have downloaded or created your tlen.lsp file, follow these steps to load and use it inside AutoCAD: Step 1: Load the Application Open your current drawing in AutoCAD. Type into the command line and press Enter .
Once you have downloaded the file, follow these steps to get it running: 1. Load the Routine Open your AutoCAD project. Type APPLOAD in the command line and hit .
Save the file to your computer, ideally in a dedicated folder for custom CAD tools (e.g., C:\CAD_Tools\ ). Installation and Usage Guide
| | Calculation Method | Code Section | | :--- | :--- | :--- | | LINE | Uses the distance function between the start point (code 10) and end point (code 11) of the line. | (distance (cdr (assoc 10 ent)) (cdr (assoc 11 ent))) | | ARC | Calculates the arc length based on its radius and the angle (in radians) between its start (code 50) and end (code 51) angles. | (* (cdr (assoc 40 ent)) (if (minusp (setq l (- (cdr (assoc 51 ent)) (cdr (assoc 50 ent))))) (+ pi pi l) l)) | | CIRCLE, SPLINE, POLYLINE, LWPOLYLINE, ELLIPSE | Uses the area command to get the perimeter, then retrieves that value with getvar "perimeter" . | (command "_.area" "_o" itm) (getvar "perimeter") | | Other Objects | If the object type does not match any of the above, the length is simply added as 0. | (T 0) |
There is no legitimate or standard AutoCAD file called "tlen.lsp" in official AutoCAD distributions. This filename is not part of Autodesk's official LISP routines. Searching for obscure .lsp files from untrusted sources poses significant security risks.
Always ensure the file extension is .lsp before downloading. Avoid .exe files from untrusted sources, as these are not standard LISP files. How to Install and Run TLEN.lsp in AutoCAD
A dialog box will appear showing the "Total Length" of all selected objects. The result is also printed in the command history (hit to see it). Automating the Load Process
While AutoCAD has built-in commands like LIST or the Properties Panel, they only show individual lengths. You would have to manually add these figures. Even the MEASUREGEOM tool requires multiple clicks for complex, fragmented lines.
tlen.lsp is a small but powerful script developed by in 1998. It uses AutoLISP, a built-in programming language for AutoCAD, to automatically calculate the total length of a set of linear objects (lines, polylines, arcs, circles, etc.). By simply selecting multiple objects, the script aggregates their lengths and displays the total, saving a significant amount of time during measurement tasks.
Instead of selecting objects one by one and checking the "Properties" palette, you simply type a command and get an instant total in a pop-up window or the command line. Key Features
This functionality is especially valuable for professionals who need precise material estimates for items like cables, pipelines, fencing, or piping. The original version was created by Tee Square Graphics in 1998, and its simplicity has cemented its status as a timeless classic in the AutoCAD community.
Free up time for complex design work rather than mundane editing.
This script is a staple for professionals in fields where linear measurements are critical: Civil Engineering: Measuring total lengths of fences, curbs, or pipes. Electrical Design: Summing up total cable or conduit runs. Quantity Surveying: Quickly estimating material needs from 2D drawings. Autodesk App Store
For example, breaking a line traditionally involves selecting the break command, selecting the line, picking two points, and confirming. With TlenLSP, you can often achieve this with a single click or a vastly simplified selection process.