AutoCAD Polyline (PLINE) Command: Options, PEDIT and Worked Examples
How to draw, close, widen and edit polylines in AutoCAD 2027: every PLINE and PEDIT option, how to join lines into a polyline, and three worked examples (a bracket, a slot and an offset) with areas and perimeters checked by script. Also explains the bulge value AutoCAD uses to store arcs.

The Polyline command in AutoCAD (PLINE, shortcut PL) draws a chain of connected straight and arc segments that AutoCAD treats as a single object. Type PL, pick a start point and keep giving points; type A to switch to arcs, W or H to set a width, L for a length, U to undo a segment and C to close the shape. Edit it later with PEDIT, and turn loose lines into one polyline with JOIN.
Key takeaways
- A polyline is one object, so one pick gives you its area and length: the 120 × 60 mm bracket in our worked example reports 7,006.86 mm² and 347.12 mm (numbers re-computed by a script, see below).
- PLINE has six options at the main prompt: Arc, Halfwidth, Length, Undo, Width and (from the third point) Close. Arc mode adds its own options, such as Angle, CEnter, Direction, Radius and Second pt.
- AutoCAD stores each arc segment as a single number, the bulge, equal to tan(θ/4): a 90° arc is 0.4142, a semicircle is exactly 1.
OFFSETon a closed polyline makes a new closed outline in one pick; the same outline drawn with five LINE and ARC objects takes five picks and leaves three corners open.- Everything below was checked against Autodesk's AutoCAD 2027 documentation (2027 is the current release, with the 2027.1 update, as of November 2026). PLINE and PEDIT work the same way in AutoCAD LT.
What is a polyline in AutoCAD?
A polyline is a single AutoCAD object made of one or more connected line and arc segments. Because the whole chain is one object, you can select, move, offset, measure, hatch or extrude it in one go, and each segment can carry its own start and end width. Plain LINE and ARC commands create a separate object for every segment.
That difference decides how much work every later step takes. Here is what changes when the same outline is drawn both ways.
| Task | Outline drawn with LINE + ARC | Outline drawn with PLINE |
|---|---|---|
| Select the whole profile | Window or pick every segment | One pick |
| Area and perimeter | Pick each boundary point, or build a boundary first | AREA → Object, one pick |
| Offset by 5 mm | One offset per segment, corners to trim or fillet | One offset, closed outline |
| Extrude or PRESSPULL to a solid | Need a region or a joined boundary first | Closed polyline extrudes directly |
| Export a profile for laser or CNC cutting | Gaps between segments can break the toolpath | One continuous closed contour |
| Varying width (arrows, tracks, filled bands) | Not possible | Start and end width per segment |
How do you draw a polyline in AutoCAD?
Type PL and press Enter, click or type the start point, then give the next points one by one. AutoCAD keeps drawing connected segments until you press Enter (leave it open) or type C (close it back to the start). Typing A switches the next segments to arcs; L switches back to lines.
What you type, one input per line (comments after the dashes):
PL -- start the command
0,0 -- start point
@120,0 -- 120 mm to the right
@0,30 -- 30 mm up
Enter -- finish, leave it open
The @ sign makes a coordinate relative to the previous point, which is how most mechanical profiles are typed in: you know the edge lengths from the part drawing, not absolute positions. Turn on Ortho (F8) or Polar tracking (F10) if you prefer to point with the mouse and type only the distance.
What do the PLINE options do?
Each option is picked by typing its capital letter at the prompt. The two width options set how thick the next segment is drawn; Length and Undo help you type exact geometry; Close finishes a closed profile.
| Option | Type | What it does | Typical use |
|---|---|---|---|
| Arc | A | Switches to arc segments (tangent to the previous segment unless you choose otherwise) | Rounded corners, slots, cam and gasket profiles |
| Halfwidth | H | Sets the distance from the centreline to one edge of a wide segment, at the start and end | When you know a half-thickness, such as a track 2 × 1.5 mm wide |
| Width | W | Sets the full start and end width of the next segment (the start width is offered as the default end width); different values make a taper | Filled arrows, tapered markers, PCB-style traces |
| Length | L | Draws a line of the length you type, in the same direction as the previous segment (tangent to it if that was an arc) | Continuing straight out of an arc without working out the angle |
| Undo | U | Removes the last segment and keeps the command running | Fixing a mistyped point without restarting |
| Close | C | Draws the last segment back to the start point and ends the command; the polyline is flagged as closed | Every profile that will be hatched, offset, measured or extruded |
A closed polyline is not the same as an open one whose last point happens to land on the first. Only a polyline closed with C (or with PEDIT → Close) is flagged closed, and that flag is what EXTRUDE, PRESSPULL and most CAM software look for. AREA is more forgiving: on an open polyline it computes the area as if the gap were closed by a straight line, but it leaves that closing line out of the perimeter, so the perimeter it reports is short. Use Close rather than snapping back to the start point.
Worked example: a bracket plate in one polyline
Here is a 120 × 60 mm bracket plate with one R30 rounded corner, drawn as a single closed polyline. The rounded corner is a tangent arc, so AutoCAD works out the centre for you.
PL -- start the command
0,0 -- vertex 1
@120,0 -- vertex 2: bottom edge
@0,30 -- vertex 3: right edge
A -- arc mode (tangent arcs)
@-30,30 -- vertex 4: end of R30 arc
L -- back to straight lines
@-90,0 -- vertex 5: top edge
C -- close to vertex 1, end
Why does the arc land where we want? The segment before it runs straight up the right edge, so a tangent arc must also start heading straight up. A quarter circle that starts at (120, 30) heading up and ends 30 mm left and 30 mm higher has its centre at (90, 30) and a radius of 30 mm.
Now check the numbers AREA → Object reports for it. The area is the 120 × 60 rectangle, minus the 30 × 30 corner square, plus the quarter circle that replaces it:
The perimeter adds all five edges, including the arc, whose length is mm:
We computed both values two ways in a Python script (an exact formula for polylines with arcs, and a dense sampling of the outline) and they agree to 0.01 mm². If your AutoCAD result differs, the usual cause is an arc that is not tangent (you picked Second pt or CEnter by mistake) or a polyline that was snapped shut instead of closed.
How do you draw a slot with one polyline?
A slot (an obround: two straight sides joined by two semicircles) is one of the most common profiles in mechanical drawings, and PLINE draws it in five inputs. For a slot 100 mm between centres and 40 mm wide:
PL → 0,0 → @100,0 → A → @0,40
→ L → @-100,0 → A → CL
Each arc is a 180° tangent arc. Its area is the 100 × 40 rectangle plus one full circle of radius 20, mm², and the perimeter is mm. The CL inside arc mode closes the shape with an arc instead of a line, which is what a slot needs.
How does polyline width work?
Width gives a segment real thickness on screen and on paper. W asks for the full starting and ending width; H asks for the distance from the centre of the segment to one edge, which is half of it. Equal values give a constant band; different values give a taper. The width applies to the next segment and stays for the following ones until you change it.
Two quick examples with numbers you can check:
- Tapered segment. Start width 5, end width 1, length 200. The filled shape is a trapezoid with area square units.
- Filled arrowhead. Start width 0, end width 8, length 20. The tip angle is . Draw the shaft first with width 1, then the head with W 8 → 0 for an arrow pointing forward.
Use width for shapes that are meant to be filled. For drawing line thickness (visible outlines thicker than centre lines and hidden lines), use layer lineweights instead: they stay correct when you plot at a different scale, while polyline width is real geometry in drawing units. The FILL setting controls whether wide polylines are shown filled or as outlines, and EXPLODE on a wide polyline throws the width away: Autodesk's documentation says the resulting lines and arcs are placed along the polyline's centre line.
What is a polyline bulge, and why does it matter?
The bulge is how AutoCAD stores an arc segment inside a polyline: one number on the vertex where the arc starts, equal to the tangent of a quarter of the arc's included angle. Zero means a straight segment, positive means counter-clockwise, negative clockwise. A 90° arc has a bulge of 0.4142 and a semicircle exactly 1.
You will meet the bulge as soon as you go beyond drawing by hand: in the DXF file (group code 42 of an LWPOLYLINE), in AutoLISP when you read a polyline's vertices, and in Python libraries that write DXF files for laser cutters and CNC machines. This short script, using the open-source ezdxf library, writes our bracket as a DXF that opens in AutoCAD as one closed polyline, then lists the segments AutoCAD would give you if you exploded it:
import math, ezdxf
# units=4 means millimetres
doc = ezdxf.new("R2018", units=4)
msp = doc.modelspace()
# bulge of a 90 degree arc = 0.4142
b = math.tan(math.radians(90) / 4)
# each vertex is (x, y, bulge)
pts = [(0, 0, 0), (120, 0, 0),
(120, 30, b), (90, 60, 0),
(0, 60, 0)]
pl = msp.add_lwpolyline(
pts, format="xyb", close=True)
doc.saveas("bracket.dxf")
# what EXPLODE would give you:
for e in pl.virtual_entities():
print(e.dxftype())
Run it and it prints LINE, LINE, ARC, LINE, LINE, and the segment lengths add up to the same 347.12 mm (we ran it with ezdxf 1.4.5; the arc is 47.12 mm long).
How do you edit a polyline with PEDIT?
Type PEDIT (shortcut PE), pick the polyline and choose an option. If you pick a plain line or arc, AutoCAD asks "Object selected is not a polyline. Do you want to turn it into one?"; answer Y. PEDIT can open or close it, join other objects to it, change the width of every segment at once, move or insert vertices, fit a smooth curve through it, straighten curves back out, control linetype dashes and reverse its direction. Pick M (Multiple) first to edit several polylines together.
| PEDIT option | What it does |
|---|---|
| Close / Open | Adds or removes the closing segment |
| Join | Adds lines, arcs or polylines whose ends meet this polyline, making one object; with Multiple you can set a fuzz distance and a join type (Extend, Add or Both) to bridge small gaps |
| Width | Sets one uniform width for every segment |
| Edit vertex | Steps through vertices to move, insert, break, straighten or set tangent and width at each one |
| Fit | Replaces segments with arcs that pass through every vertex |
| Spline | Makes a smooth curve that uses the vertices as control points (it does not pass through them) |
| Decurve | Removes Fit or Spline curves and returns to straight segments |
| Ltype gen | Runs a dashed linetype continuously around vertices instead of restarting at each one |
| Reverse | Reverses the vertex order (the direction), which flips text-in-linetype and the order a CAM tool cuts |
| Undo | Undoes the last PEDIT operation |
How do I convert lines into a polyline in AutoCAD?
Use PEDIT: pick one of the lines, answer Y to "Do you want to turn it into one?", then choose J (Join) and select the rest. Or run JOIN, pick a polyline (or the first piece) and select the others. JOIN needs the pieces to touch end to end and lie in one plane; if there are small gaps, use PEDIT → Multiple → Join and give a fuzz distance.
When AutoCAD refuses to join, it is almost always one of three things:
- Gaps or overlaps at the ends. Zoom in on each corner; fix with FILLET at radius 0 or with a fuzz distance.
- Different elevations. Two lines that look connected in plan view may sit at different Z heights. Check Properties, or flatten them first.
- Not in the same plane as the polyline's coordinate system (common after working in 3D). Set the UCS back to World.
If the outline is already closed by existing geometry, the BOUNDARY command (shortcut BO) is often quicker: click inside the enclosed area and AutoCAD traces a new closed polyline around it, leaving the original lines untouched.
Why use a polyline instead of lines?
Because every step after drawing gets shorter. The clearest example is OFFSET, which you use for wall thickness, sheet-metal flanges, clearance outlines and gasket profiles.
The offset polyline is a 130 × 70 mm outline with an R35 corner, so its area is mm². It is ready to extrude, hatch or measure. The five separate offsets would still need three corners trimmed or filleted before any of that.
The same logic applies to HATCH (a closed polyline is a clean boundary), EXTRUDE and PRESSPULL (a closed polyline becomes a solid; open lines don't), and DXF export for fabrication, where a closed contour is what the cutting software expects.
2D polyline, 3D polyline or spline: which should you use?
| 2D polyline (PLINE) | 3D polyline (3DPOLY) | Spline (SPLINE) | |
|---|---|---|---|
| Segments | Lines and true arcs | Straight lines only | One smooth curve |
| Points | All in one plane | Any X, Y, Z | Any X, Y, Z |
| Width | Yes | No | No |
| Best for | Part profiles, slots, plates, outlines to extrude | Routing paths in 3D: pipes, cables, sweeps | Free-form curves: styling lines, cam profiles defined by points |
For mechanical 2D drafting the 2D polyline is the default. Reach for a spline only when the shape really is free-form; a profile made of lines and true arcs is easier to dimension, and manufacturing software handles it more exactly.
Which system variables change how polylines behave?
PLINEWID: the default width for new polylines (normally 0).PLINEGEN: whether dashed linetypes run continuously around vertices (1) or start and end with a dash at each vertex (0, the default). Same as PEDIT → Ltype gen; it does not apply to tapered segments.PLINETYPE: whether AutoCAD creates lightweight (optimised) 2D polylines. The default, 2, creates lightweight polylines and converts old-style ones when you open a drawing from Release 14 or earlier; leave it there.PEDITACCEPT: set to 1 and PEDIT turns a picked line or arc into a polyline without asking (default 0, which asks).PLINECONVERTMODE: when you convert a spline to a polyline, whether AutoCAD uses straight segments (0, the default) or arcs (1).
How to practise the polyline command
Draw these three in one sitting, then check each with AREA → Object: the bracket above (expect 7,006.86 mm² and 347.12 mm), the slot (5,256.64 mm² and 325.66 mm), and a 5 mm outward offset of the bracket (8,837.11 mm²). If all three match, you can type polyline geometry accurately, which is most of what interviewers check in an AutoCAD drafting test.
Skill-Lync's free AutoCAD Essentials for Mechanical Engineers course on Grow covers this and the rest of 2D drafting in 44 video lessons (about 20 hours), from coordinate entry to manufacturable drawings. For a mentored version with projects and certification, see the AutoCAD course for mechanical engineers or compare all Skill-Lync AutoCAD courses. Not sure which fits your branch and goals? Talk to a Skill-Lync counsellor.
To practise on the full product, Autodesk gives eligible students and educators free one-year access through its Education plan, renewable while you stay eligible; the licence is for learning and research only, not commercial work.
Frequently asked questions
What is the shortcut for the polyline command in AutoCAD?
The shortcut is PL; the full command name is PLINE. Type either at the command line and press Enter. You can also find it on the Home tab, in the Draw panel. To edit an existing polyline use PE, the shortcut for PEDIT, and to merge lines into one polyline use JOIN (shortcut J).
How do I close a polyline in AutoCAD?
While drawing, type C at the next-point prompt after at least two segments; in arc mode type CL to close with an arc. For a polyline that is already drawn, run PEDIT, pick it and choose Close. Snapping the last point onto the first does not set the closed flag, so EXTRUDE and CAM software may treat it as open.
How do I find the area of a polyline in AutoCAD?
Run AREA, type O for Object and pick the polyline; AutoCAD reports its area and perimeter. On an open polyline it closes the gap with a straight line for the area but leaves that line out of the perimeter. LIST also shows the area. Our 120 × 60 mm bracket with an R30 corner gives 7,006.86 mm² and 347.12 mm.
Can I turn a polyline back into lines and arcs?
Yes. EXPLODE splits a polyline into separate line and arc objects, one per segment. Any width is lost, the pieces sit on the old centre line, and the pieces no longer behave as one object for offset, area or extrude. If you only need to change a few segments, PEDIT → Edit vertex usually works better than exploding.
What is the difference between LINE and PLINE in AutoCAD?
LINE creates a separate object for every straight segment and cannot draw arcs or widths. PLINE creates one object made of any mix of straight and arc segments, each with optional start and end width. Use LINE for quick construction geometry and PLINE for any profile you will offset, hatch, measure or extrude.
Why won't my lines join into a polyline?
The ends must meet and the pieces must lie in one plane. Usual causes: small gaps or overlaps, lines at different Z elevations, or a rotated UCS; closed objects such as circles cannot be joined. Zoom in on each corner, fix gaps with FILLET at radius 0 or PEDIT → Multiple → Join with a fuzz distance.
Sources and further reading
- Autodesk, PLINE (command reference, AutoCAD 2027), accessed 19 Nov 2026
- Autodesk, PEDIT (command reference), accessed 19 Nov 2026
- Autodesk, PEDIT 2D polyline options: Join, fuzz distance, Jointype, accessed 19 Nov 2026
- Autodesk, JOIN (command reference), accessed 19 Nov 2026
- Autodesk, EXPLODE (width and tangent information discarded), accessed 19 Nov 2026
- Autodesk, AREA (Object option, open polylines), accessed 19 Nov 2026
- Autodesk, BOUNDARY (closed polylines from enclosed areas), accessed 19 Nov 2026
- Autodesk, 3DPOLY (straight segments only), accessed 19 Nov 2026
- Autodesk, PLINETYPE system variable, accessed 19 Nov 2026
- Autodesk, PLINEGEN system variable, accessed 19 Nov 2026
- Autodesk, DXF reference: LWPOLYLINE group codes, accessed 19 Nov 2026
- Autodesk, DXF reference: VERTEX (bulge definition), accessed 19 Nov 2026
- Autodesk, Education plan: free one-year access for eligible students and educators, accessed 19 Nov 2026
- ezdxf project, ezdxf documentation: LWPOLYLINE (version 1.4.5 used for the script above), accessed 19 Nov 2026
- Skill-Lync worked examples: area, perimeter, offset and bulge values computed by script for this article, 19 Nov 2026


