Function Syntax: Line_Overlap / Text_Overlap / Line_Overlap_Text_Overlap / FixLineTextOverlap Version: 2.0 Date: 06.10.2025 2:52:42PM AI+https://www.cadtutor.net/forum/topic/70623-move-any-overlapped-text-and-create-a-new-line/ Description 🚀 FixLineTextOverlap is an AutoCAD AutoLISP utility that arranges overlapping vertical lines and nearby TEXT or MTEXT labels along a clean vertical rail. The main benefit is faster CAD cleanup, clearer annotation layout, controlled line step-outs, and improved drawing readability for infrastructure, utility, schematic, and Civil 3D production drawings. Commands Provided 🧰 Line_Overlap - spaces selected vertical LINE entities along a picked crank point and builds clean step-out polylines. 📝 Text_Overlap - aligns and spaces TEXT and MTEXT along a vertical rail, reusing the spacing from Line_Overlap when available. 🔄 Line_Overlap_Text_Overlap - runs the line overlap and text overlap workflows in sequence. FixLineTextOverlap - practical alias for the complete cleanup workflow. Primary User Workflow 📌 For Line_Overlap, select vertical LINE entities, then pick a crank point that defines the Y level and reference X for the step-out arrangement. 📌 For Text_Overlap, select TEXT and MTEXT, then pick a rail position or reuse the last picked X from Line_Overlap. 📌 For FixLineTextOverlap, run both steps with shared spacing and a consistent rail so linework and annotations remain coordinated. Functionalities 📏 Automatic spacing default - computes distance as 1.25 times the current AutoCAD TEXTSIZE and lets the user override it for line cleanup. 🎯 Crank point control - uses a picked point to define the rail X and crank Y for the line step-out geometry. 🧱 Line replacement workflow - deletes selected vertical LINE entities and recreates them as clean stepped LWPOLYLINE crank geometry. 🔁 Incremental spacing - uses ++rarify to force consecutive X positions to be at least the chosen spacing apart without reordering the selected line sequence. 📝 Text and MTEXT cleanup - spaces TEXT and MTEXT labels along the same rail so labels no longer overlap horizontally. 📊 Row grouping - groups annotation objects by Y row with a tolerance based on five percent of TEXTSIZE for robust handling of slightly misaligned labels. ↔️ Left and right rail logic - splits text to each side of the rail, keeps the closest item fixed as an anchor, and steps remaining labels outward. 🔧 Justification-safe editing - moves TEXT using DXF point code 10 or 11 depending on justification and moves MTEXT using insertion point code 10. 🌐 Coordinate-safe transforms - uses trans to move between OCS, UCS, and WCS so text movement remains precise. 🧩 Layer preservation - creates crank polylines on the selected source layer so output remains aligned with drawing standards. ↩️ Undo safety - wraps changes with AutoCAD UNDO begin and end so the operation can be reverted in one step. Important Internal Behaviors 🔴 Selection filters - Line_Overlap accepts only LINE entities, while Text_Overlap accepts only TEXT and MTEXT. 🔴 Shared spacing and rail - Text_Overlap reads the last spacing and last picked X from Line_Overlap when they are available. 🔴 Editing primitives - the routine uses entget, entmod, entupd, entmakex, entdel, trans, and AutoCAD UNDO grouping. Outputs ✅ Overlapping vertical lines are replaced by neatly spaced crank polylines on the original layer. ✅ TEXT and MTEXT labels are repositioned along a shared vertical rail so annotations read clearly without collisions. This improves AutoCAD drawing readability, CAD drafting consistency, annotation clarity, and production speed. Notes and Limitations ⚠️ The routine is intended for suitable near-vertical LINE entities and selected TEXT or MTEXT labels. ⚠️ Empty selections are reported and skipped gracefully. ⚠️ The default spacing is based on TEXTSIZE, but dense drawings may need a custom spacing value. Tags 🏷️ AutoCAD 🏷️ AutoLISP 🏷️ Civil 3D 🏷️ CAD Cleanup 🏷️ Line Overlap 🏷️ Text Overlap 🏷️ MTEXT 🏷️ Annotation Cleanup 🏷️ Drafting Automation 🏷️ Utility Drawings 🏷️ Infrastructure Plans 🏷️ LWPOLYLINE 🏷️ CAD Productivity 🏷️ Drawing Readability