Need to calculate the total length of multiple lines or polylines in AutoCAD?
The BuildMEP Total Length AutoCAD LISP instantly calculates the combined length of selected objects with a single command. It’s a lightweight productivity tool designed for HVAC engineers, architects, MEP designers, quantity surveyors, and CAD professionals who want faster and more accurate measurements.
| Quick Specs | |
|---|---|
| đź’° Price | Free |
| Compatibility | Depends on the routine’s functions, edition, release and operating system; see checks below. |
| 🎯 Difficulty | Beginner |
Downloads Include
âś… Total Length AutoCAD LISP (.LSP) âś… Easy installation guide âś… Step-by-step YouTube video tutorial âś… APPLOAD installation method âś… Drag & Drop installation method
📦 Total Length AutoCAD LISP FREE
⬇ Download LISP File ▶ Watch Installation Video
đź§° More free BuildMEP tools
- MEPCOUNT Block Count LISP – count every block by name or layer, export to Excel
- Total Area LISP guide – total area of rooms, zones and hatches
- Free Heat Load Calculator – room-by-room cooling load, with Excel version
- HVAC Unit Converter – airflow, pressure, capacity and more
- BuildMEP LISP files on GitHub – source code for our own routines
📺 Video Tutorial
Watch the complete step-by-step installation guide below.
What Is an AutoCAD LISP?
AutoLISP is a scripting language developed specifically for AutoCAD. It allows users to automate repetitive tasks, create custom commands, and improve drafting efficiency.
Instead of performing multiple manual operations, a LISP routine executes them automatically with a simple command.
Thousands of engineers worldwide use LISP routines daily to improve their workflows.
What Is the Total Length of LISP?
The inspected TOTL routine sums selected lines, arcs, circles, ellipses, lightweight/ordinary polylines and splines. Its filter excludes polygon meshes and polyface meshes. Block inserts and their nested contents are not traversed. A circle contributes its circumference, and duplicate or overlapping objects are counted separately.
Examples to test separately on a copy of a drawing include:
- Lines
- Polylines
- Arcs
- Splines
- Multiple selected entities
Instead of measuring each object individually, the LISP adds every selected length and displays the total instantly.
Benefits of Using the Total Length LISP
Save Time
Measure hundreds of line segments in seconds.
Improve Accuracy
Eliminate manual calculation mistakes.
Increase Productivity
Spend more time designing and less time measuring.
Perfect for Quantity Take-Offs
Ideal during BOQ preparation and estimating.
Easy Installation
No programming knowledge required.
Common Engineering Applications
This LISP is useful for:
HVAC Engineering
- Duct length calculation
- Refrigerant piping
- Condensate drain routing
Plumbing
- Water supply piping
- Drainage layouts
- Pump connections
Fire Protection
- Sprinkler piping
- Fire hose routing
Electrical
- Cable tray length
- Conduit routing
- Underground duct banks
Civil Engineering
- Road centerlines
- Survey boundaries
- Utility layouts
Architecture
- Wall centerlines
- Floor plans
- Site layouts
Edition, Platform and Measurement Checks
AutoCAD LT for Windows introduced AutoLISP in 2024. This file calls vl-load-com, vlax-ename->vla-object, vlax-curve-getEndParam and vlax-curve-getDistAtParam. Autodesk’s curve-function table and ActiveX conversion table list these operations for Windows AutoCAD and AutoCAD LT 2024. The ActiveX calls are unavailable on Mac and Web, so this exact download is not suitable there as supplied. Function support is documented; execution in each release is not tested here.
The 640-byte ZIP contains one file, Total length (TOTL).lsp, with 1,059 uncompressed bytes. It defines C:TOTL but declares no author, licence or routine version. Its older-version alert mentions “VxJoinLines”; that text is not evidence of authorship or a verified compatibility range. BuildMEP provides this use guide without claiming authorship of the source. The archive was inspected as text, not executed.
The sum is in drawing length units. A drawing in millimetres needs division by 1000 for metres. Check model versus paper space, 2D versus 3D length, duplicate/overlapping segments and block contents. Duct or pipe centreline length does not automatically include fittings, waste, vertical drops or procurement allowances.
How to Install the Total Length LISP
Method 1 – Drag & Drop
- Download the LISP file.
- Open AutoCAD.
- Drag the LISP into AutoCAD.
- Review the source and author terms first. Load a trusted file for the current session using your edition’s supported loading workflow; do not enable automatic loading before verification.
Installation completed.
Method 2 – APPLOAD
- Open AutoCAD.
- Type APPLOAD.
- Press Enter.
- Extract the ZIP and select the reviewed .lsp file.
- Click Load.
- Close the window.
How to Use the Total Length Command
- Enter TOTL, the command defined in the inspected download
- Press Enter.
- Select all required objects.
- Press Enter again.
The routine shows the combined length in an alert dialog. It can use a supported preselection or prompt for objects. Compare a known length with AutoCAD’s Properties or LIST output before using the total for a take-off.
How to Find the LISP Command
Open the LISP file with a text editor.
The inspected file begins with this command definition:
(defun C:TOTL ( / CurObj CurSet FltLst TmpLgt TotLgt)
The text after C: is the AutoCAD command.
Only modify the routine if the author’s terms permit it. Preserve attribution and keep an original copy.
After editing:
- Save the file
- Reload using APPLOAD
The new command becomes available.
Why Engineers Love This Tool
Unlike manual measurement methods, the Total Length LISP requires only one command and one selection.
Benefits include:
- Faster project completion
- Cleaner workflow
- Less repetitive work
- Reduced drafting errors
- Better productivity
Frequently Asked Questions
Is this LISP free?
The existing BuildMEP download is offered without a charge. Check the author’s licence separately; free access does not establish redistribution or modification permission.
Does it work with AutoCAD LT?
AutoCAD LT for Windows supports AutoLISP from 2024. The inspected TOTL file uses Windows ActiveX conversion and curve functions listed in Autodesk’s LT 2024 reference. Mac and Web do not support these calls. This source and documentation check is not a runtime test; validate a known length in your installed release.
Can I edit the command?
The command name is defined after C: in the source. Only modify it if the applicable licence permits modification; the inspected file contains no licence declaration.
Can I use it every day?
After reviewing the code and validating results in your edition, you can consider your supported autoload workflow. Test updates before adding them to a startup configuration.
Monthly Engineering Briefing
Get notified when new BuildMEP guides and tools publish. One concise email a month.
Related BuildMEP Resources
You may also like:
- AutoCAD Total Area LISP – measure closed-boundary areas the same way
- MEP Engineering Downloads
- HVAC Duct Sizing Guide
- Ductulator Tool
Using the Routine in Daily Drafting
The Total Length AutoCAD LISP is one of the most practical productivity tools for AutoCAD users. It automates repetitive length calculations, saves time on engineering projects, and improves overall drafting efficiency.
Whether you’re working on HVAC, plumbing, fire protection, electrical, or architectural drawings, this simple LISP routine can become an essential part of your AutoCAD toolkit.
If you found this guide helpful, subscribe to the BuildMEP YouTube channel and explore more engineering tutorials, calculators, and CAD resources available on BuildMEP.


