Function Syntax: SelectStraightEntities Version: 1.0 Date: 25.03.2026 8:39:59AM N/A 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. Function Syntax Main command: SelectStraightEntities SEO Optimized Overview 🌐 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. Primary Workflow • Run SelectStraightEntities. • The routine scans LINE LWPOLYLINE and POLYLINE objects in the current layout. • Each candidate is checked for orthogonal direction and excluded layer state. • All valid objects are placed into one selection set. • The result becomes the active AutoCAD selection. 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. Important Commands and Aspects 🧩 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. Result 🎯 The result is an active selection containing orthogonal line and polyline geometry from the current layout except objects on PAGE_LIMIT_02. Important Notes ⚠️ The angle test is relative to the drawing XY coordinate system used by the source. ⚠️ Polyline arc segments are rejected. ⚠️ Only LINE LWPOLYLINE and POLYLINE entity types are scanned. SEO Keywords 🏷️ AutoCAD, 🏷️ Civil 3D, 🏷️ AutoLISP, 🏷️ SelectStraightEntities, 🏷️ Orthogonal lines, 🏷️ Horizontal vertical, 🏷️ LWPOLYLINE, 🏷️ Selection set, 🏷️ PAGE_LIMIT_02, 🏷️ CAD cleanup