TotalLengthAll

Short description

📏 AutoCAD LISP utility for calculating the total length of selected lines, polylines, 3D polylines, circles, arcs, ellipses, and splines with one command.

Command:

ELEN

Description:

📏 TotalLengthAll is a lightweight AutoCAD AutoLISP length calculator designed to total the lengths of multiple curve-based drawing entities in the current drawing units.

🚀 Run ELEN to calculate the combined length of selected geometry such as LINE, POLYLINE, LWPOLYLINE, 3D POLYLINE, CIRCLE, ARC, ELLIPSE, and SPLINE objects.

🔍 The routine supports both pre-selected objects and command-driven selection. When unsupported objects are included in the selection set, the tool reports how many were filtered out and continues with the supported curve entities.

📊 The result is printed directly in the AutoCAD command line, showing the total number of calculated entities and the combined total length.

🧰 This is useful for CAD quantity checks, quick linear measurements, road or utility drafting reviews, preliminary takeoffs, and fast verification of multiple curve lengths without manually adding each object length.

Helper function: (if any)​

🧠 The routine uses AutoCAD Visual LISP curve functions to convert selected entity names to VLA objects and calculate each object length with vlax-curve-getDistAtParam and vlax-curve-getEndParam.

🔎 It uses a selection filter for curve-style entities and excludes MLINE objects from the calculation workflow.

Functionalities:

🚀 ELEN command for fast total-length calculation.
📏 Calculates total length for selected AutoCAD curve entities.
📐 Supports lines, polylines, 3D polylines, circles, arcs, ellipses, and splines.
🔍 Works with implied selection or manual entity selection.
🧹 Filters unsupported object types and reports skipped items.
📊 Prints entity count and total length in current drawing units.
🧰 Non-destructive workflow that does not modify drawing geometry.
⚙️ Compact AutoLISP routine suitable for quick CAD production checks.

Result:

✅ After running ELEN, AutoCAD reports the number of accepted entities and their combined total length in the command line.

📌 The drawing remains unchanged because the routine only reads entity geometry and outputs a measurement summary.

Images, animations etc.

Pixel

XAML code:

<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:src="clr-namespace:Autodesk.Windows;assembly=AdWindows">
    
    <src:RibbonToolTip x:Key="TotalLengthAll">
        <src:RibbonToolTip.ExpandedContent>
            <StackPanel>
                <TextBlock Background="AntiqueWhite" TextAlignment="Left">
				<Bold>Function Syntax: Elen</Bold>
				<LineBreak/>
				<Hyperlink>http://www.asmitools.com </Hyperlink>
				<LineBreak/>

<Bold><Run Foreground="DodgerBlue">📏 TotalLengthAll</Run></Bold><LineBreak/>
<Run Foreground="White">AutoCAD LISP utility for calculating the total length of selected curve-based drawing entities in the current drawing units.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="Orange">Command</Run></Bold><LineBreak/>
<Run Foreground="White">🚀 Run </Run><Bold><Run Foreground="DarkRed">ELEN</Run></Bold><Run Foreground="White"> in the AutoCAD command line to calculate the combined length of selected geometry.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="DodgerBlue">SEO Optimized Description</Run></Bold><LineBreak/>
<Run Foreground="White">📏 TotalLengthAll is a fast AutoCAD total length calculator for production drawings, quantity checks, drafting reviews, and quick CAD measurement workflows.</Run><LineBreak/>
<Run Foreground="White">📐 The routine calculates the combined length of selected </Run><Bold><Run Foreground="LimeGreen">LINE</Run></Bold><Run Foreground="White">, </Run><Bold><Run Foreground="LimeGreen">POLYLINE</Run></Bold><Run Foreground="White">, </Run><Bold><Run Foreground="LimeGreen">3D POLYLINE</Run></Bold><Run Foreground="White">, </Run><Bold><Run Foreground="LimeGreen">CIRCLE</Run></Bold><Run Foreground="White">, </Run><Bold><Run Foreground="LimeGreen">ARC</Run></Bold><Run Foreground="White">, </Run><Bold><Run Foreground="LimeGreen">ELLIPSE</Run></Bold><Run Foreground="White">, and </Run><Bold><Run Foreground="LimeGreen">SPLINE</Run></Bold><Run Foreground="White"> objects.</Run><LineBreak/>
<Run Foreground="White">🔍 It works with pre-selected entities or with a fresh selection started from the command prompt.</Run><LineBreak/>
<Run Foreground="White">📊 The command prints the total number of accepted objects and the combined length directly in the AutoCAD command line.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="LimeGreen">Functionalities</Run></Bold><LineBreak/>
<Run Foreground="White">🚀 </Run><Bold><Run Foreground="LimeGreen">Fast command workflow</Run></Bold><Run Foreground="White"> - starts with the </Run><Bold><Run Foreground="Orange">ELEN</Run></Bold><Run Foreground="White"> command.</Run><LineBreak/>
<Run Foreground="White">📏 </Run><Bold><Run Foreground="LimeGreen">Total length calculation</Run></Bold><Run Foreground="White"> - sums the length of all accepted selected curve entities.</Run><LineBreak/>
<Run Foreground="White">📐 </Run><Bold><Run Foreground="LimeGreen">Multiple geometry types</Run></Bold><Run Foreground="White"> - supports lines, polylines, 3D polylines, circles, arcs, ellipses, and splines.</Run><LineBreak/>
<Run Foreground="White">🔍 </Run><Bold><Run Foreground="LimeGreen">Selection flexibility</Run></Bold><Run Foreground="White"> - accepts implied selection or manual selection after the command starts.</Run><LineBreak/>
<Run Foreground="White">🧹 </Run><Bold><Run Foreground="LimeGreen">Unsupported object filtering</Run></Bold><Run Foreground="White"> - reports filtered objects and continues with valid geometry.</Run><LineBreak/>
<Run Foreground="White">📊 </Run><Bold><Run Foreground="LimeGreen">Command-line result</Run></Bold><Run Foreground="White"> - displays entity count and total length in current drawing units.</Run><LineBreak/>
<Run Foreground="White">🔒 </Run><Bold><Run Foreground="LimeGreen">Non-destructive read-only process</Run></Bold><Run Foreground="White"> - does not modify, erase, move, or create drawing entities.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="DodgerBlue">Practical Result</Run></Bold><LineBreak/>
<Run Foreground="White">✅ The result is a quick AutoCAD length summary for selected objects, useful for CAD measurement, linear quantity verification, utility layout review, roadway drafting checks, and preliminary takeoff work.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="DarkRed">Important Note</Run></Bold><LineBreak/>
<Run Foreground="White">⚠️ TotalLengthAll reports values in the current drawing units and outputs the result only in the AutoCAD command line.</Run><LineBreak/>
<Run Foreground="White">⚠️ It does not create Excel files, tables, fields, labels, or model-space annotation.</Run><LineBreak/>




</TextBlock>
                
                <!-- Use MediaElement for GIF (static first frame) and Image as fallback -->


            </StackPanel>
        </src:RibbonToolTip.ExpandedContent>
    </src:RibbonToolTip>
</ResourceDictionary>

Additional info:

Share this page:

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Tags: 🏷️ Autocad Lisps, 🏷️ BoQ, 🏷️ BoQ_menu, 🏷️ Length
0
Would love your thoughts, please comment.x
()
x