cadblockdwg

Explainer · what is a polyline in autocad

What is a polyline in AutoCAD?

DWGDXFFree1,366 words

By Saumyajit Maity · Published 21 Jan 2023 · Updated 24 Dec 2024

A polyline is one of AutoCAD's most useful objects, and understanding why is a genuine level-up for any drafter. Where a simple Line is a single straight segment between two points, a polyline is a single connected object made of many segments — straight and curved — that AutoCAD treats as one entity. Draw a rectangle as a polyline and it's one object you can select, offset, move and measure in a click; draw it as four separate lines and it's four fiddly objects that don't quite behave as a unit.

That 'one connected object' nature is what makes polylines the right choice for outlines, boundaries, areas, profiles and paths — anything where you want a continuous edge rather than a heap of disconnected segments. This page explains what a polyline is, how it differs from a line, the PLINE and PEDIT commands that create and edit it, and the extra abilities — width, arcs, joining — that make it so much more capable than a plain line.

Line vs polyline: the core difference

A Line object is a single straight segment with two endpoints — draw a five-sided shape with the LINE command and you get five entirely separate line objects that merely happen to touch. Select one and you've selected one edge; the others don't come along.

A Polyline (drawn with PLINE) is one object containing all its vertices and segments. Draw that same five-sided shape as a polyline and a single click selects the whole outline. That difference cascades into everything: you can OFFSET a polyline outline inward or outward as one clean parallel shape (offsetting separate lines gives disconnected, mitre-less segments); you can query its total length or enclosed area instantly; you can apply a single width or linetype to the whole run. For any continuous edge, the polyline is almost always the better object.

Drawing with the PLINE command

You create a polyline with PLINE (or PL). It works like LINE — pick a start point, then keep picking points — but every segment joins into one object as you go. The command's real power is in its in-line options, which appear at the prompt as you draw:

- Arc — switch from drawing straight segments to drawing arc segments, so you can flow from a straight edge into a curve and back without leaving the command. This is how you draw a slotted shape or a rounded outline in one continuous object. - Width / Halfwidth — give the segment a drawn width, so the polyline prints as a thick band (useful for arrows, leaders, or emphasised outlines). - Close — join the last point back to the first with a proper closing segment, making a genuinely closed loop (important for area and boundary operations). - Undo — step back a segment without restarting.

Mixing straight and arc segments in one PLINE is the everyday way to draw real-world profiles — a worktop with a curved end, a path that bends, a custom gasket shape.

Why polylines are better for outlines and areas

The single-object nature pays off most when you need to do something with the whole shape. Three jobs in particular almost demand a polyline:

Area and perimeter — a closed polyline reports its enclosed area and total length directly (select it and read Properties, or use the AREA command on the object). Separate lines can't tell you an area because they don't enclose anything as a unit. Offsetting — offsetting a closed polyline produces a clean, fully-connected parallel outline (think a wall's inner and outer face, or a setback line), where offsetting loose lines leaves a disjointed set. Boundaries and hatching — hatches and many tools want a closed boundary; a closed polyline is the cleanest possible boundary, with no gaps to trip the hatch algorithm. For any of these, converting loose lines into a polyline first is the standard move.

Editing polylines with PEDIT

The PEDIT command (Polyline Edit) is the dedicated tool for reshaping and converting polylines, and it does several distinct jobs.

Its most-used trick is Join: select several connected lines and arcs, run PEDIT → Join, and they fuse into a single polyline (PEDIT will first offer to convert a selected line into a polyline, then let you add the touching segments). This is how you turn a shape drawn as separate lines into one tidy outline. PEDIT also lets you Open or Close a polyline, change its Width uniformly, edit individual Vertices (move, insert or delete them), and Fit or Spline the polyline into a smooth curve through its points. For quick vertex edits you can also just grip-edit — click the polyline and drag the blue grips — but PEDIT is the full toolbox when you need to restructure the object.

Width, arcs and smooth curves

Three polyline abilities deserve highlighting because plain lines simply can't do them.

Width — a polyline can carry a drawn width, and it can even taper, with a different start and end width on a segment. That's how the classic solid arrowhead is made: a short polyline segment tapering from a width to zero. Width is a property of the polyline geometry itself, separate from lineweight (which is a print thickness). Arc segments — because a single polyline can hold both line and arc segments, it's the natural object for any profile that mixes straights and curves, drawn in one continuous flow. Smoothing — PEDIT's Spline and Fit options turn a polyline's straight framework into a smooth curve, either passing through the vertices (Fit) or pulled toward them (Spline). This is a common way to draw flowing shapes — a contour, a freeform boundary, a curved planting bed — from a rough polyline skeleton.

Polylines and blocks

Polylines are the backbone of clean block geometry, which is why they matter even when you're using ready-made blocks rather than drawing your own. A well-made block's outline is typically a single closed polyline, so it selects cleanly, offsets predictably and reports its footprint area — exactly the qualities you want when you snap it into a layout and need to check clearances.

If you're building your own blocks (with BLOCK or WBLOCK), drawing the outline as a closed polyline before defining the block is good practice: it keeps the geometry tidy, makes the symbol's footprint a single measurable object, and behaves well when the block is later exploded or edited. Many of the blocks on this site are drawn with polyline outlines for precisely this reason, so when you explode one to borrow part of it, you get sensible connected geometry rather than a scatter of separate lines. Understanding polylines, then, helps you both create better blocks and get more out of the ones you download.

Free download

Browse the full library — DWG & DXF, no signup.

Download CAD blocks

Questions

Frequently asked

What's the difference between a line and a polyline in AutoCAD?+

A Line is a single straight segment between two points. A Polyline is one connected object made of many straight and/or arc segments, treated as a single entity — so you can select, offset, measure the area of, and apply width to the whole shape at once, which separate lines can't do.

How do I join separate lines into one polyline?+

Use the PEDIT command. Select one of the connected lines, let PEDIT convert it to a polyline when prompted, choose the Join option, then select the remaining touching segments. They fuse into a single polyline. The segments must actually meet end-to-end for the join to work.

Can a polyline have a width?+

Yes. A polyline can be given a drawn width (uniform, or tapering from a start width to an end width) using the Width option in the PLINE command or via PEDIT. This is different from lineweight — width is real geometry, used for things like solid arrowheads and emphasised bands.

Why use a closed polyline instead of four lines for a rectangle?+

A closed polyline is one object, so you can select it in a click, offset it as a clean parallel outline, read its enclosed area and perimeter directly, and use it as a tidy hatch boundary. Four separate lines do none of these as a unit, and can leave gaps that break hatches and trims.

Related downloads

Blocks for this guide

Popular blocks to download

Related categories

Related guides