5.1 Polylines & Polyline Editing

Key Takeaways

  • PLINE constructs 2D lightweight polylines (LWPOLYLINE) combining line and arc segments into a single unified entity with custom start and end widths.

  • The Length option draws a polyline segment at the angle of the preceding line or perfectly tangent to the preceding arc segment.

  • CONVERTPOLY converts legacy heavyweight polylines (2DPOLYLINE) to lightweight polylines (LWPOLYLINE), reducing file size and memory footprint.

  • PEDIT Join uses a configurable fuzz distance to bridge non-touching segment endpoints, while Straighten removes intermediate vertices between two marked points.

  • The PLINEGEN system variable and PEDIT Ltype gen control whether dashed linetypes generate continuously across the full polyline (1/ON) or restart per segment at each vertex (0/OFF).

Last updated: October 2026

5.1 Polylines & Polyline Editing

Note

Polylines form the geometric backbone of production drafting in AutoCAD. Unlike independent lines and arcs, a polyline is a single contiguous sequence of connected linear and curved segments treated by the AutoCAD database as a unified object. Mastering polyline creation options and precision editing commands is essential for area calculations, boundary creation, CNC vector paths, 3D modeling extrusions, and the Autodesk Certified Professional (ACP) exam.


1. The PLINE Command Architecture & Creation Options

Executing PLINE (or PL) prompts for a starting point. Once the initial vertex is placed, AutoCAD opens a rich set of geometric sub-options at the command line:

Specify next point or [Arc/Halfwidth/Length/Undo/Width]:
OptionShortcutFunctional Operation & Geometric Behavior
ArcASwitches the command from linear mode into curved arc mode, exposing arc construction sub-prompts.
HalfwidthHSpecifies the width measured from the polyline centerline to its outer boundary (equal to half the total segment width).
LengthLExtends a segment along the exact orientation of the preceding segment. If the previous segment was an arc, it creates a line segment perfectly tangent to that arc at its endpoint.
UndoURemoves the most recently placed vertex or segment without canceling the PLINE command.
WidthWSpecifies explicit starting and ending widths for subsequent segments, enabling uniform thickness or tapered transitions.
CloseCAppears after at least two vertices are placed; draws a closing segment back to the initial start point and flags the entity as closed.

Polyline Width vs. Halfwidth

AutoCAD allows drafters to assign physical thickness to polyline segments directly within the vector geometry, completely independent of layer lineweights or plot styles:

  • Width (W): Prompts first for Starting width <0.0000> and then Ending width <0.0000>. Entering matching values yields a uniform wide segment (such as a 4-inch wall or a printed circuit trace). Entering differing values generates a linearly tapered segment. Specifying a starting width of 10 and an ending width of 0 creates a sharp arrow head.
  • Halfwidth (H): Functions identically to Width, but the numerical value represents the distance from the centerline to either side. For example, entering a halfwidth of 3.0 yields a total polyline segment width of 6.0 drawing units. Halfwidth is frequently employed in civil road design where roadway lanes are dimensioned from a surveyed centerline.
Uniform Width:   Start Width = 4.0 ══════════════════════ End Width = 4.0

Tapered Arrow:   Start Width = 12.0 ╲                    
                                     ════════════►        End Width = 0.0
                                    ╱

Polyline Arc Mode Sub-Options

Typing A at the PLINE prompt switches into arc construction mode. By default, AutoCAD draws an arc segment tangent to the preceding polyline segment. However, entering specialized sub-options provides full geometric control:

  • Angle (A): Prompts for the included angle of the arc segment. Positive values draw counterclockwise; negative values draw clockwise.
  • Center (CE): Specifies the center point of the arc circle.
  • Direction (D): Overrides default tangency by allowing the user to specify a custom tangent direction vector for the starting point of the arc segment.
  • Radius (R): Prompts for the radius of the arc segment.
  • Second pt (S): Initiates a 3-point arc segment, prompting for an intermediate point on the circumference followed by the endpoint.
  • Line (L): Exits arc mode and returns the PLINE command back to standard straight line mode.

Tip

The Length option is one of the most efficient tools for drawing mechanical runouts and architectural transitions. When drawn following an arc segment, typing L and entering a distance draws a straight line that continues perfectly tangent to the exit vector of that arc without requiring an explicit tangent OSNAP override.


2. Lightweight Polylines (LWPOLYLINE) vs. Heavy Polylines (2DPOLYLINE)

AutoCAD maintains two distinct internal database representations for 2D polylines:

Database Architecture Comparison:

Legacy Heavyweight (2DPOLYLINE):
[POLYLINE Header] ──► [VERTEX 1] ──► [VERTEX 2] ──► [VERTEX 3] ──► [SEQEND]
(Multiple database entity headers, unique entity handles per vertex, high memory overhead)

Modern Lightweight (LWPOLYLINE):
[LWPOLYLINE Entity]
  ├─ Number of Vertices: 3
  ├─ Coordinate Array: [(X1,Y1), (X2,Y2), (X3,Y3)]
  ├─ Width Array: [(SW1,EW1), (SW2,EW2), (SW3,EW3)]
  └─ Bulge Array: [B1, B2, B3]
(Single compact record, single entity handle, smaller file footprint)
Technical AttributeLightweight Polyline (LWPOLYLINE)Traditional Heavyweight (2DPOLYLINE)
Database Entity NameLWPOLYLINEPOLYLINE
Data Storage StructureSingle entity definition containing arrays of vertex coordinates, bulge factors, and widthsHeader entity followed by independent VERTEX sub-entities, terminated by a SEQEND entity
Entity HandlesOne handle for the entire polylineDistinct handle for header, each vertex, and SEQEND
Memory ConsumptionMinimal; optimized for high-performance redrawsSubstantial; causes file bloat in complex site plans
3D Coordinate PlanePlanar only; coordinates stored in OCS (Object Coordinate System) with 2D (X,Y)(X,Y) and Elevation (ZZ)Supports 3D vertices with variable ZZ elevations if created via 3DPOLY

The PLINETYPE System Variable

The PLINETYPE system variable dictates how AutoCAD creates new polylines and how it handles legacy polylines from older DWG files:

  • 0: Polylines in older drawings are not converted when opened; new polylines created with PLINE are written as legacy heavyweight 2DPOLYLINE objects.
  • 1: Polylines in older drawings are not converted when opened; new polylines are created as lightweight LWPOLYLINE objects.
  • 2 (Default Standard): Polylines in older drawings are automatically converted to lightweight LWPOLYLINE objects when the file is opened; new polylines are created as lightweight.

The CONVERTPOLY Command

To manually optimize drawings containing thousands of legacy heavyweight polylines, use the CONVERTPOLY command:

Command: CONVERTPOLY
Convert polyline type [Heavy/Light] <Light>:

Selecting Light converts selected or drawing-wide heavyweight polylines into optimized lightweight polylines. Selecting Heavy converts lightweight polylines back into traditional heavyweight entities (required by certain legacy CAM post-processors or third-party LISP routines).


3. Polyline Editing with PEDIT

The PEDIT (or PE) command modifies existing 2D polylines, 3D polylines, and converts independent lines and arcs into polyline structures.

Selecting Single vs. Multiple Objects

When invoking PEDIT, AutoCAD prompts:

Select polyline or [Multiple]:

If you select an individual line or arc rather than a polyline, AutoCAD displays: Object selected is not a polyline. Do you want to turn it into one? <Y>: Pressing Enter converts the object into a single-segment polyline.

Typing M (Multiple) allows window or crossing selection of hundreds of lines, arcs, or polylines simultaneously, batch converting them without individual confirmation prompts.

Core PEDIT Operations

  • Close / Open: Toggles the topological closure flag. If a polyline is open, Close connects the last vertex to the first vertex with a straight or curved segment. If already closed, the option changes to Open, which removes the closing segment without deleting vertices.
  • Join (J): Merges contiguous lines, arcs, or polylines whose endpoints touch (or, when PEDIT was started with Multiple, lie within a specified fuzz distance) into a single continuous polyline.
  • Width (W): Assigns a single uniform width across all segments of the polyline, instantly stripping any individual segment taperings.
  • Fit (F): Constructs a smooth curve consisting of pairs of tangent circular arcs passing through every polyline vertex.
  • Spline (S): Uses the polyline vertices as a control frame to compute a cubic or quadratic B-spline approximation curve. The curve does not pass through interior vertices.
  • Decurve (D): Strips all curve-fit or B-spline calculations, reverting every segment back to straight linear segments connecting the original defining vertices.
  • Reverse (R): Reverses the vertex order of the polyline from end to start. This is vital when working with directional linetypes (such as gas lines with embedded text ---GAS--- or fence lines) where text or symbology appears upside down or points backwards.

Important

Join Fuzz Distance: When PEDIT is started with the Multiple option and you choose Join, AutoCAD prompts for a fuzz distance (join tolerance) and offers a Jointype option (Extend, Add, or Both). In drawings with drafting imperfections, endpoints may fail to connect by tiny fractions of a unit (e.g., 0.005). Setting the fuzz distance to 0.01 bridges these microscopic gaps, extending or trimming segment endpoints to form a watertight closed polyline required for hatch boundaries or CNC toolpaths.


4. Deep Dive: PEDIT Edit Vertex Operations

Selecting the Edit Vertex (E) option in PEDIT places an interactive marker (X) on the first vertex of the polyline and opens the vertex editing sub-menu:

Enter a vertex editing option
[Next/Previous/Break/Insert/Move/Regen/Straighten/Tangent/Width/eXit] <N>:
Vertex Editing Navigation:
  [V1 (X)] ──Next──► [V2] ──Next──► [V3] ──Next──► [V4]
     ▲                 │
     └────Previous─────┘
Sub-OptionShortcutOperational Function
Next / PreviousN / PNavigates the active editing marker (X) forward or backward among the polyline vertices.
BreakBSplits the polyline into two separate polylines. AutoCAD marks the start vertex; you navigate to a second vertex and select Go to cut the span between them.
InsertIAdds a new vertex immediately following the currently marked vertex. AutoCAD prompts for the coordinate location of the new vertex.
MoveMRelocates the currently marked vertex to a newly specified coordinate position.
StraightenSDeletes all intermediate vertices between two marked points, replacing the entire sequence with a single straight segment.
TangentTAttaches a specific tangent direction vector to the current vertex for subsequent Fit curve calculations.
WidthWRedefines the starting and ending widths for the single segment immediately following the marked vertex.
eXitXExits the Edit Vertex sub-menu and returns to the primary PEDIT prompt.

Step-by-Step Procedure: Straightening a Polyline Section

  1. Type PEDIT and select the polyline.
  2. Enter E for Edit Vertex.
  3. Type N (Next) or P (Previous) until the X marker rests on the beginning of the section to be straightened.
  4. Type S for Straighten.
  5. AutoCAD prompts: Enter next vertex <N>:. Type N to navigate the marker to the ending vertex of the target section.
  6. Type G for Go. AutoCAD instantly eliminates all intermediate vertices and connects the two marked vertices with a clean straight line segment.

5. Continuous Linetype Generation: PLINEGEN and Ltype Gen

When non-continuous linetypes (such as HIDDEN, CENTER, or DASHED) are applied to polylines with short segment lengths, unexpected graphical errors frequently occur:

PLINEGEN = 0 (Off):  [Dash-Gap-Dash] ──► Vertex ──► [Dash-Gap-Dash] ──► Vertex
(Linetype restarts at each vertex; short segments lack space and appear solid!)

PLINEGEN = 1 (On):   ───  ───  ───  ───  ───  ───  ───  ───  ───  ───  ───
(Continuous linetype generated across the entire length, ignoring vertex spacing)

The PLINEGEN System Variable

  • 0 (Disabled / Off): AutoCAD calculates the linetype pattern independently for each segment. It forces a full dash at the beginning and end of each segment. If a segment is shorter than the dash-gap cycle length of the assigned linetype, the entire segment appears as an unbroken solid line.
  • 1 (Enabled / On): AutoCAD calculates the linetype pattern continuously across the entire polyline path, treating the geometry as one seamless entity. Dash-gap cycles flow smoothly around corners and across short segments without interruption.

Tip

PLINEGEN only affects newly drawn polylines. To correct existing polylines in a drawing, select the object, open the Properties Palette (Ctrl+1), locate Linetype generation, and change the dropdown from Disabled to Enabled. Alternatively, use PEDIT, select the polyline, type L for Ltype gen, and set it to ON.


6. The JOIN Command

Objective 3.2.b names JOIN alongside PEDIT, and it is usually the faster way to combine objects that already meet end to end. Select a source object (or select several objects at once), and AutoCAD joins them into one object whose type depends on what was selected:

Objects selectedResult
Collinear lines (gaps between them are allowed)A single line
Arcs on the same imaginary circle (gaps allowed)A single arc; the cLose option turns one arc into a full circle
Elliptical arcs on the same ellipseA single elliptical arc, or a full ellipse with cLose
Lines, arcs, and polylines connected end to end on one planeA single 2D polyline
Linear or curved objects connected end to end that are not coplanarA 3D polyline
Splines or helixes connected end to endA single spline

Rules that decide many exam items:

  • Objects joined into a polyline must touch end to end; JOIN does not close gaps between mixed lines and arcs. Use PEDIT > Multiple > Join with a fuzz distance when small gaps must be bridged.
  • Arcs are joined counterclockwise starting from the source arc.
  • The joined object takes its layer and other properties from the source object.

After joining, set PLINEGEN or the polyline's Linetype generation property so dashed linetypes run continuously across the new vertices (section 5 above).

Test Your Knowledge

When applying a dashed linetype such as HIDDEN or CENTER to a polyline containing numerous short line segments, the dashes appear solid or unevenly spaced because AutoCAD calculates the linetype pattern independently between each pair of vertices. Which command option or system variable ensures that the linetype pattern is generated continuously across the full length of the polyline regardless of vertex locations?

A

Set the PLINEGEN system variable to 1 or enable Ltype gen in PEDIT

B

Set the PSLTSCALE system variable to 0 in model space

C

Use PEDIT and apply the Fit curve option across all segments

D

Execute the REGENALL command after setting LTSCALE to 0.5

Test Your Knowledge

A CAD drafter needs to combine several separate line and arc segments into a single continuous polyline boundary. However, due to slight precision errors during drafting, some segment endpoints fail to touch by approximately 0.02 drawing units. How can the drafter join these segments using the PEDIT command without manually snapping each endpoint?

A

Select all segments and use the Fit option to bridge the gaps

B

Run PEDIT > Multiple, select the segments, choose Join, and enter a fuzz distance of 0.05

C

Convert the segments to 3D polylines using CONVERTPOLY before running Join

D

Use the Edit Vertex sub-option Move to snap each endpoint onto its adjacent neighbor, one vertex at a time

Test Your Knowledge

While editing an intricate polyline boundary using the Edit Vertex option of the PEDIT command, a drafter needs to remove five consecutive redundant vertices along a wall boundary and replace them with a single direct straight segment. Which Edit Vertex sub-option accomplishes this?

A

Break

B

Insert

C

Straighten

D

Tangent

Test Your Knowledge

A drafter runs JOIN with a LINE as the source object and selects two more lines that are collinear with it but separated by small gaps. What is the result?

A

One line object that spans from the outermost endpoints of the three lines

B

One 2D polyline with three segments and two short connecting segments

C

An error message, because JOIN cannot join objects that have gaps

D

A block that groups the three lines without changing their geometry

Sections you finish are checked off in the contents.