CloseParalelPolylines

Short description

Purpose: Automatically connect two open or parallel-like entities and merge them into one continuous polyline Supported objects: LWPOLYLINE, LINE, ARC, SPLINE Usage style: Cleanup or closing gaps between two aligned open objects

Command:

Command name: CloseParallelPolylines How to run: Type CLOSEPARALLELPOLYLINES and press Enter User prompt: Select two open polylines, arcs, splines, or lines Selection filter: Only accepts LWPOLYLINE, LINE, ARC, SPLINE

Description:

This routine takes exactly two valid open curve objects, forces polylines open if closed, connects their start points and end points using new LINE entities, then merges everything into one polyline using PEDIT join. System prompts are suppressed and restored afterward for clean automated processing.

Helper function: (if any)​

System variable handling Saves CMDECHO and PEDITACCEPT, forces silent and auto-accept mode, restores afterwardEntity type validator Converts each selection into a VLA object and verifies type (Polyline, Line, Arc, Spline)Polyline opener Closed LWPOLYLINE objects are automatically set to open before processingget-pts helper Returns start and end points of any supported object typeSelection set builder Collects both main entities and the two connector lines for a final PEDIT join

Functionalities:

Entity filtering Skips unsupported types and informs the userCount enforcement Ensures exactly two valid entities; warns if fewer or moreAutomatic opening of polylines Closed LWPOLYLINE is forced open with a status messageEndpoint connection Creates LINE from start-to-start and end-to-end via ENTMAKEXAutomatic joining Uses PEDIT multiple and join to merge all entities into one polylineFailure handling Gracefully aborts with a message if selection invalid or empty

Result:

Geometric result Produces one polyline formed from the two originals plus two connectorsDrawing cleanup Converts parallel or open shapes into a single clean polyline ready for editingEnvironment safety All system variables restored to previous values

Images, animations etc.

Pixel

Additional info:

Share this page:

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x