SelectStraightEntities

Short description

🧩 SelectStraightEntities automatically finds and selects orthogonal LINE LWPOLYLINE and POLYLINE geometry in the current AutoCAD layout.
📐 Accepted segments must run at approximately 0 90 180 or 270 degrees and lightweight polylines must contain no bulged arc segments.
🚫 Geometry on layer PAGE_LIMIT_02 is explicitly excluded.

Image 000 19

Command:

Main command: SelectStraightEntities

Description:

🌐 The routine scans the current CTAB only using global selection filters.
📏 LINE objects are accepted when their XY direction is orthogonal within a small tolerance.
📐 LWPOLYLINE and POLYLINE objects are accepted only when every checked segment is orthogonal.
⭕ Any nonzero bulge value causes the polyline to be rejected.
🚫 Objects on PAGE_LIMIT_02 are skipped regardless of geometry.
✅ All accepted entities are combined and made the active AutoCAD selection set.

Helper function: (if any)​

angle-is-ortho tests XY segment angles against orthogonal directions.
lwpline-is-ortho checks polyline bulges and segment angles.
line-is-ortho checks one LINE entity.
sssetfirst activates the resulting selection set.

Functionalities:

✅ Automatic drawing scan – requires no manual object selection.
✅ Current layout filtering – uses CTAB to limit the scan.
✅ LINE detection – selects horizontal and vertical lines.
✅ LWPOLYLINE detection – selects polylines containing only horizontal and vertical straight segments.
✅ POLYLINE detection – attempts the same orthogonal test on old polyline entities.
✅ Arc exclusion – rejects polyline geometry containing nonzero bulge values.
✅ Layer exclusion – ignores PAGE_LIMIT_02.
✅ Selection handoff – leaves valid entities actively selected.

Result:

🎯 The result is an active selection containing orthogonal line and polyline geometry from the current layout except objects on PAGE_LIMIT_02.

Images, animations etc.

Image 000 19
Pixel

XAML code:

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:src="clr-namespace:Autodesk.Windows;assembly=AdWindows" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<src:RibbonToolTip x:Key="SelectStraightEntities">
<src:RibbonToolTip.ExpandedContent>
<StackPanel>
    <TextBlock Background="AntiqueWhite" TextAlignment="Left">
        <Bold>Function Syntax: SelectStraightEntities</Bold>
        <LineBreak />
        <Bold>Version: 1.0 Date: 25.03.2026 8:39:59AM</Bold>
        <LineBreak />
        <Hyperlink>N/A</Hyperlink>
        <Bold>
            <Run Foreground="DodgerBlue">Description</Run>
        </Bold>
        <LineBreak />
        <Run Foreground="White">🧩 SelectStraightEntities automatically finds and selects orthogonal LINE LWPOLYLINE and POLYLINE geometry in the current AutoCAD layout.</Run>
        <LineBreak />
        <Run Foreground="White">📐 Accepted segments must run at approximately 0 90 180 or 270 degrees and lightweight polylines must contain no bulged arc segments.</Run>
        <LineBreak />
        <Run Foreground="White">🚫 Geometry on layer PAGE_LIMIT_02 is explicitly excluded.</Run>
        <LineBreak />
        <LineBreak />
        <Bold>
            <Run Foreground="DodgerBlue">Function Syntax</Run>
        </Bold>
        <LineBreak />
        <Run Foreground="White">Main command: </Run>
        <Bold>
            <Run Foreground="Orange">SelectStraightEntities</Run>
        </Bold>
        <LineBreak />
        <LineBreak />
        <Bold>
            <Run Foreground="DodgerBlue">SEO Optimized Overview</Run>
        </Bold>
        <LineBreak />
        <Run Foreground="White">🌐 The routine scans the current CTAB only using global selection filters.</Run>
        <LineBreak />
        <Run Foreground="White">📏 LINE objects are accepted when their XY direction is orthogonal within a small tolerance.</Run>
        <LineBreak />
        <Run Foreground="White">📐 LWPOLYLINE and POLYLINE objects are accepted only when every checked segment is orthogonal.</Run>
        <LineBreak />
        <Run Foreground="White">⭕ Any nonzero bulge value causes the polyline to be rejected.</Run>
        <LineBreak />
        <Run Foreground="White">🚫 Objects on PAGE_LIMIT_02 are skipped regardless of geometry.</Run>
        <LineBreak />
        <Run Foreground="White">✅ All accepted entities are combined and made the active AutoCAD selection set.</Run>
        <LineBreak />
        <LineBreak />
        <Bold>
            <Run Foreground="LimeGreen">Primary Workflow</Run>
        </Bold>
        <LineBreak />
        <Run Foreground="White">• Run SelectStraightEntities.</Run>
        <LineBreak />
        <Run Foreground="White">• The routine scans LINE LWPOLYLINE and POLYLINE objects in the current layout.</Run>
        <LineBreak />
        <Run Foreground="White">• Each candidate is checked for orthogonal direction and excluded layer state.</Run>
        <LineBreak />
        <Run Foreground="White">• All valid objects are placed into one selection set.</Run>
        <LineBreak />
        <Run Foreground="White">• The result becomes the active AutoCAD selection.</Run>
        <LineBreak />
        <LineBreak />
        <Bold>
            <Run Foreground="LimeGreen">Functionalities</Run>
        </Bold>
        <LineBreak />
        <Run Foreground="White">✅ </Run>
        <Bold>
            <Run Foreground="LimeGreen">Automatic drawing scan</Run>
        </Bold>
        <Run Foreground="White"> - requires no manual object selection.</Run>
        <LineBreak />
        <Run Foreground="White">✅ </Run>
        <Bold>
            <Run Foreground="LimeGreen">Current layout filtering</Run>
        </Bold>
        <Run Foreground="White"> - uses CTAB to limit the scan.</Run>
        <LineBreak />
        <Run Foreground="White">✅ </Run>
        <Bold>
            <Run Foreground="LimeGreen">LINE detection</Run>
        </Bold>
        <Run Foreground="White"> - selects horizontal and vertical lines.</Run>
        <LineBreak />
        <Run Foreground="White">✅ </Run>
        <Bold>
            <Run Foreground="LimeGreen">LWPOLYLINE detection</Run>
        </Bold>
        <Run Foreground="White"> - selects polylines containing only horizontal and vertical straight segments.</Run>
        <LineBreak />
        <Run Foreground="White">✅ </Run>
        <Bold>
            <Run Foreground="LimeGreen">POLYLINE detection</Run>
        </Bold>
        <Run Foreground="White"> - attempts the same orthogonal test on old polyline entities.</Run>
        <LineBreak />
        <Run Foreground="White">✅ </Run>
        <Bold>
            <Run Foreground="LimeGreen">Arc exclusion</Run>
        </Bold>
        <Run Foreground="White"> - rejects polyline geometry containing nonzero bulge values.</Run>
        <LineBreak />
        <Run Foreground="White">✅ </Run>
        <Bold>
            <Run Foreground="LimeGreen">Layer exclusion</Run>
        </Bold>
        <Run Foreground="White"> - ignores PAGE_LIMIT_02.</Run>
        <LineBreak />
        <Run Foreground="White">✅ </Run>
        <Bold>
            <Run Foreground="LimeGreen">Selection handoff</Run>
        </Bold>
        <Run Foreground="White"> - leaves valid entities actively selected.</Run>
        <LineBreak />
        <LineBreak />
        <Bold>
            <Run Foreground="DodgerBlue">Important Commands and Aspects</Run>
        </Bold>
        <LineBreak />
        <Run Foreground="White">🧩 angle-is-ortho tests XY segment angles against orthogonal directions.</Run>
        <LineBreak />
        <Run Foreground="White">🧩 lwpline-is-ortho checks polyline bulges and segment angles.</Run>
        <LineBreak />
        <Run Foreground="White">🧩 line-is-ortho checks one LINE entity.</Run>
        <LineBreak />
        <Run Foreground="White">🧩 sssetfirst activates the resulting selection set.</Run>
        <LineBreak />
        <LineBreak />
        <Bold>
            <Run Foreground="DodgerBlue">Result</Run>
        </Bold>
        <LineBreak />
        <Run Foreground="White">🎯 The result is an active selection containing orthogonal line and polyline geometry from the current layout except objects on PAGE_LIMIT_02.</Run>
        <LineBreak />
        <LineBreak />
        <Bold>
            <Run Foreground="DarkRed">Important Notes</Run>
        </Bold>
        <LineBreak />
        <Run Foreground="White">⚠️ </Run>
        <Bold>
            <Run Foreground="DarkRed">The angle test is relative to the drawing XY coordinate system used by the source.</Run>
        </Bold>
        <LineBreak />
        <Run Foreground="White">⚠️ </Run>
        <Bold>
            <Run Foreground="DarkRed">Polyline arc segments are rejected.</Run>
        </Bold>
        <LineBreak />
        <Run Foreground="White">⚠️ </Run>
        <Bold>
            <Run Foreground="DarkRed">Only LINE LWPOLYLINE and POLYLINE entity types are scanned.</Run>
        </Bold>
        <LineBreak />
        <LineBreak />
        <Bold>
            <Run Foreground="Yellow">SEO Keywords</Run>
        </Bold>
        <LineBreak />
        <Run Foreground="Yellow">🏷️ AutoCAD, 🏷️ Civil 3D, 🏷️ AutoLISP, 🏷️ SelectStraightEntities, 🏷️ Orthogonal lines, 🏷️ Horizontal vertical, 🏷️ LWPOLYLINE, 🏷️ Selection set, 🏷️ PAGE_LIMIT_02, 🏷️ CAD cleanup</Run>
        <LineBreak />
        <LineBreak />
    </TextBlock>
    <Grid>
        <Image Source="Image_000.png" Stretch="Uniform" />
    </Grid>
</StackPanel>
</src:RibbonToolTip.ExpandedContent>
</src:RibbonToolTip>
</ResourceDictionary>

Additional info:

Share this page:

Page Tag: 🏷️ LWPOLYLINE

  • SelectStraightEntities

    Short description🧩 SelectStraightEntities automatically finds and selects orthogonal LINE LWPOLYLINE and POLYLINE geometry in the current AutoCAD layout. 📐 Accepted segments must run at approximately 0 90 180 or 270 degrees and lightweight polylines must contain no bulged arc segments. 🚫 Geometry on layer PAGE_LIMIT_02 is explicitly excluded. Command:Main command: SelectStraightEntities Description:🌐 The routine scans…

  • ParallelPolylinesOption

    Short description🧩 ParallelPolylinesOption is a DCL utility for closing two parallel open curves into one joined polyline or reopening a closed lightweight polyline into two parallel open sides. ➗ Both close and unclose workflows can automatically generate a midpoint centerline polyline on layer _HILFSLINIEN. 🎛️ The dialog provides Close Unclose Centerline Apply Undo OK and…

  • ConvertMultiplePolylines

    Short description🧩 ConvertMultiplePolylines is an AutoCAD AutoLISP utility for converting LINE and legacy 2D POLYLINE geometry into a modern lightweight polyline workflow. 🎛️ The embedded DCL dialog lets the user process selected entities or all compatible entities in the drawing and define a joining fuzz distance. 🔗 A positive fuzz distance activates PEDIT joining with…

  • Make_layers_linetypes_draw

    Short description🧾 Make_layers_linetypes_draw is an AutoCAD AutoLISP linetype catalog generator that draws sample polylines and MTEXT labels for loaded linetypes. 🎛️ It uses DCL dialogs for start point, length, row spacing, linetype scale, label content, wildcard filtering, paging, and linetype selection. Command:🚀 Main command: DRAW_LTYPE_LAYERS 🧩 Load the LSP in AutoCAD or Civil 3D, then…

  • Text2Multileader_2

    Short description📐 Text2Multileader_2 is an AutoCAD and Civil 3D AutoLISP utility for converting selected TEXT or MTEXT into one MLeader using a selected LINE or POLYLINE as the leader geometry guide. 📝 The routine reads source text, derives the arrowhead and landing points from the guide object, creates the MLeader, and removes the original guide…

  • Xline2Poly

    Short descriptionConverts AutoCAD XLINE and RAY entities into finite LWPOLYLINE segments using configurable offsets and a dialog-based workflow. Command:Xline2Poly Xline2Poly_DEBUG Description:Xline2Poly is an AutoLISP utility that converts infinite XLINE entities and semi-infinite RAY entities into finite two-vertex LWPOLYLINE objects. It provides a temporary DCL interface for selecting objects, filtering by type/layer/handle, configuring conversion distances, applying…

  • MiddleLinePolylines_2

    Short description🧩 MiddleLinePolylines_2 provides the CPL_2 command for generating a simple two vertex centerline between two open curves. 📍 The routine averages the start points of the first and last selected curve and averages their end points. 📐 A new two vertex LWPOLYLINE is created in ModelSpace from those two midpoint positions. Command:Main command: CPL_2…

  • DynamicDivide

    Short description🧩 DynamicDivide is an AutoCAD AutoLISP utility that dynamically divides a LINE ARC or LWPOLYLINE into equal segments using POINT entities. 👁️ Moving the cursor over a supported object displays temporary division points before the user commits the operation. ⌨️ The number of divisions can be changed interactively with plus and minus keys or…

  • DoubleOffset

    Short description🧩 Double Offset is a Lee Mac AutoLISP utility that offsets a selected curve to both sides using one offset distance or a through point. 🎛️ The command includes options for deleting the source object and placing the new offsets on the current layer or the source layer. 📐 Supported objects include ARC CIRCLE…