Function Syntax: CPL Version: 1.0 Date: 20.06.2026 6:38:59PM website: https://www.cadtutor.net/forum/topic/49702-centerline-between-two-polylines/ Description 🧩 MiddleLinePolylines provides the CPL command for creating a centerline between two selected open AutoCAD curves. 📐 The current version accepts general open vlax curve objects such as LINE LWPOLYLINE POLYLINE SPLINE and ARC rather than only polylines. 🧠 The algorithm uses temporary curve copies offsets lofted geometry and geometric intersection processing to derive the middle path. Function Syntax Main command: CPL SEO Optimized Overview 🖱️ The user selects a first and second open curve and the picked sides help determine the temporary offset directions. 🌐 Selected curves are copied with VLA Copy so general supported curve types can be processed. 📏 A working offset distance is calculated from the maximum distance relationship between the two curves. 🏗️ The routine creates temporary offsets and lofts geometry from each source copy toward its offset. 🎯 Intersection style processing is then used to derive the center path. 📐 The source reports a polyline result for straight geometry and a spline result when curves are present. 🛡️ Elevation normal UCS view and AutoCAD version checks are included. ↩️ Temporary system variables are restored through the command error handler and undo group. Primary Workflow • Run CPL. • Select the first open curve at the desired side. • Select the second open curve. • The routine validates elevation normal view and curve conditions. • Temporary copies offsets and loft geometry are generated. • The derived intersection path is converted into the centerline result. • Temporary construction geometry is cleaned and AutoCAD settings are restored. Functionalities Two curve centerline - creates a middle path between two selected open curves. General open curve support - uses vlax curve validation for line polyline spline arc and similar objects. Automatic working offset - calculates a construction offset from curve separation. Temporary source copies - protects original curves during the construction process. Loft based processing - uses AutoCAD LOFT geometry as part of the centerline algorithm. Straight result handling - can produce polyline centerline geometry. Curved result handling - can produce spline centerline geometry. Elevation validation - checks selected curve elevation compatibility. Normal validation - checks source object orientation compatibility. UCS and view validation - includes environment checks before geometric processing. Important Commands and Aspects 🧩 MaxDist calculates separation between selected curve geometry. 🧩 check_offset validates temporary offset creation. 🧩 check_elev and check_normal validate source curve compatibility. 🧩 check_ET check_ucs check_view and check_ver perform environment checks. Result 🎯 The result is a centerline between the two selected open curves. 📐 The resulting entity can be a polyline for straight source geometry or a spline when curved geometry requires it. Important Notes ⚠️ Both selected objects must be valid open curve objects. ⚠️ The algorithm creates temporary copies offsets lofts and other construction geometry during processing. ⚠️ The command includes compatibility checks for elevation normals UCS and view orientation. SEO Keywords 🏷️ AutoCAD, 🏷️ Civil 3D, 🏷️ AutoLISP, 🏷️ CPL, 🏷️ MiddleLinePolylines, 🏷️ Centerline, 🏷️ Average curve, 🏷️ LOFT, 🏷️ Spline, 🏷️ Polyline, 🏷️ Open curves, 🏷️ CAD geometry