Join lines into a polyline in AutoCAD without closing the wrong gap
Connect the intended segments first. Add a closing edge only when it belongs in the design.
For a chain of lines, use PEDIT → Multiple, select the intended objects, accept conversion if prompted, then Join. Check endpoints and the joining method before using a fuzz distance. Join does not mean Close: Close adds a segment between the first and last vertices.
Check the intended contour before joining
Keep a separate original. Identify the source object types, drawing units, endpoint positions and Z/elevation. Decide whether the result should remain an open chain or become a closed boundary; text, splines and true ellipses require their own preparation.
A line, polyline and block are different objects even when they look connected. AutoCAD JOIN is source-type dependent: a source LINE joins collinear lines, while other combinations can produce different object types. This guide uses PEDIT for a multi-segment polyline task.
Use PEDIT Multiple and Join on a copy
Select only the intended chain
Run PEDIT, choose M (Multiple), select the intended lines or polylines, and press Enter. If asked whether to convert lines to polylines, choose Yes. Prompts vary with the version and PEDITACCEPT setting.
Join exact endpoints first
Choose Join. For endpoints that actually touch, start with a fuzz distance of 0. Inspect the result rather than assuming an unchanged appearance means the objects became one.
Measure a real gap before increasing tolerance
If joining fails, inspect both endpoints at adequate coordinate precision and check their Z/elevation. A larger fuzz distance is justified only when it covers an intended connection without capturing a different nearby feature. The sample’s 0.04 mm gap is a known input, not a recommended setting for all drawings.
Check how the join changes geometry
PEDIT Jointype offers Extend (extend or trim), Add (insert a straight connecting segment), and Both (extend or trim where possible, otherwise add a segment). Record the chosen method and compare the changed endpoints and dimensions.
Keep an open result when that is the task
Exit PEDIT and inspect object count, entity type and the resulting path. A connected polyline can still be intentionally open. Preserve openings, holes and separate parts that belong to the design.
Close only a verified boundary
If the intended boundary needs a final edge, select that polyline in PEDIT and choose Close. Inspect the new first-to-last segment. Save a separate delivery file, reopen it, and recheck dimensions, entity types and closure in the receiving application.
Use different checks for a failed join and an open contour
An apparent meeting point may hide a gap or different Z values. Do not flatten a design or erase elevation only to make a command succeed unless that projection is an intended design change. Noncoplanar linear objects can produce 3D results in CAD; TraceDXF does not project them silently into XY.
A polyline can also contain arc bulges. Joining LINE and ARC objects does not guarantee a straight-segment LWPOLYLINE in this site’s subset. Keep unsupported-object warnings visible and check the complete file in suitable software.
Compare five small DXF references
These project-authored files are engineering references, not AutoCAD PEDIT/JOIN results. The first four have a 100 × 70 mm XY boundary. The open reference deliberately has a 70 mm terminal separation; Close adds that 70 mm edge. The gapped LINE file has only one internal gap of 0.04 mm.
The noncoplanar reference preserves an endpoint at Z=5 mm. Its full 3D coordinates are recorded separately; a flat contour boundary is not applicable. The checker excludes that line and blocks SVG export, so a supported portion cannot be mistaken for the complete design.
| Sample | Entity inventory | Known condition | Flat XY bounds (mm) |
|---|---|---|---|
| Touching separate lines | 3 LINE | Open chain; 2 touching joins | 100 × 70 |
| One 0.04 mm internal gap | 3 LINE | One internal gap; intended ends remain open | 100 × 70 |
| Open polyline reference | 1 LWPOLYLINE | 4 vertices, 3 segments; open | 100 × 70 |
| Closed polyline reference | 1 LWPOLYLINE | 4 vertices, 4 segments; closed | 100 × 70 |
| Noncoplanar lines | 3 LINE | Endpoint Z=5 mm; not a flat XY contour | Not applicable to the complete 3D geometry |
Test gaps in your own AutoCAD before choosing fuzz distance
Use the authored gap series to test how PEDIT Join treats nearby endpoints in your own AutoCAD. Join adds objects to an open polyline and normally requires touching endpoints; Multiple lets you set a fuzz distance for small endpoint gaps, and Join is separate from Close, which adds a segment between the first and last vertex. A larger fuzz distance is not automatically safer, because it can move or shorten endpoints.
Jointype changes how gaps are bridged: Extend extends or trims the endpoints, Add inserts a straight segment, and Both tries extend or trim before adding. Non-coplanar end-to-end joins generally become 3D polylines, so record the resulting type rather than assuming a 2D polyline. The series is an input test packet with no stored PEDIT result and no recommended universal tolerance.
For each run, record:
Do not treat one recorded fuzz value as a production rule. If 0.01 mm and 0.1 mm produce different endpoint movement or closure in your setup, the deciding factor is the recorded topology and bounds, not the size of the number.
Download the five-file gap series record and run the five inputs in your own AutoCAD.
- The resulting object count and whether it is still a single polyline.
- Vertex count, original endpoint positions, and any endpoint movement caused by fuzz distance or Jointype.
- Whether the polyline is open or closed, and whether the closure was an added first-to-last segment rather than a joined internal gap.
- Measured bounds before and after, so any bridge or trim is visible numerically.
| Internal gap | Input condition | Record after PEDIT Join |
|---|---|---|
| 0 mm | Endpoints touch | Object count, polyline type, vertices, open/closed state, bounds |
| 0.01 mm | One small internal gap | Fuzz distance, Jointype, endpoint movement, closure, bounds |
| 0.04 mm | One small internal gap | Fuzz distance, Jointype, endpoint movement, closure, bounds |
| 0.1 mm | One larger internal gap | Fuzz distance, Jointype, endpoint movement, closure, bounds |
| 1.0 mm | One visibly larger internal gap | Whether joined; geometry change; closure and bounds |
Keep a before and after join record
Before you run PEDIT Join, write down what you expect the geometry to become, then record what actually happened. That two-part record is what lets you tell a successful join from one that moved a free endpoint, absorbed a small gap, or turned an open contour into a closed one you did not intend.
Record these before starting:
Then run PEDIT with Multiple, select the segments, and use Join. After the command finishes, record the output again.
A few rules make the record useful:
To see what the record should capture, download the join contour reference record and geometry. These are project-authored deterministic DXF files, not output from AutoCAD, PEDIT or JOIN. The packet includes touching LINE entities, LINE entities with a 0.04 mm internal gap, open and closed LWPOLYLINE references, and a noncoplanar LINE file. The touching and gapped files use millimeter units with 100 × 70 mm flat bounds; the gapped file has the single 0.04 mm gap. The open reference has four vertices and three segments, and the closed reference has four vertices and four segments.
Use those references only as comparison shapes. They do not demonstrate a native AutoCAD result, and this page does not record one. AutoCAD documents PEDIT and the Join option, the Join, Jointype and Close distinctions, and the source type and coplanarity requirements for JOIN. Check those requirements before you expect a set of segments to join at all.
Save the file after the join, then inspect units, entities and bounds to confirm the record matches the file. If entities go missing or a supported type does not appear, use the missing or unsupported DXF entities guide. If the geometry started as a spline, handle that as a separate spline approximation task before you evaluate closure.
- Intended result: a single open polyline, a single closed polyline, or something else.
- Source entities: entity types and counts (for example, LINE entities, LWPOLYLINE entities, and how many of each).
- Units and overall bounds of the drawing area you are working in.
- Known gaps and their measured size, if any.
- Whether you will use Close, and on which contour.
- The Jointype setting you will use.
- Log endpoint movement explicitly. If a free endpoint shifts to meet another, that is a change to your geometry, and it should appear in the record rather than be assumed away.
- Treat any fuzz distance you set as a value for this drawing, not a portable setting. There is no universal fuzz tolerance that suits every file.
- Keep Close separate from Join. Joining segments into a polyline is not the same as closing a contour; decide closure on its own, after the join result is on screen.
- Compare object counts and bounds rather than relying on how the contour looks. A contour can look closed while a tiny internal gap remains.
| Item | Before join | After join |
|---|---|---|
| Entity types and counts | ||
| Endpoints that moved from their original position | ||
| Jointype used | ||
| Fuzz distance, if set | ||
| Gap present (size and location) | ||
| Contour closure (open or closed) | ||
| Bounds (min/max X and Y, in drawing units) | ||
| Close applied? |
Check the delivery file with its actual unit and entity contract
The DXF checker reports supported geometry in its declared drawing unit. DXF-to-SVG converts known source units to physical millimeters; if units are unknown, choose the actual source unit explicitly. No unit is inferred from how large a shape looks.
TraceDXF does not join, close or repair your DXF. It accepts only its documented straight LINE/LWPOLYLINE subset in the default XY plane. Keep the original and confirm the full result in the application that will use it.
Sources and verification
The steps summarize the linked Autodesk documentation checked on 15 October 2026. The CC0 downloads are deterministic project geometry, not a native AutoCAD reproduction, LightBurn import or machining test.