Skip to main content

Polyline

The polyline command draws a connected path of any number of straight segments, all stored as a single LWPOLYLINE entity. Because the entire path is one object, selecting it selects every segment at once — move, rotate, or scale the whole shape in a single operation. This is the key distinction from chained Lines, where each segment is an independent entity.

Polylines can also be closed: the Rectangle command uses the same LWPOLYLINE entity with a close flag set.

Drawing a polyline

  1. Type polyline in the terminal or click the Polyline toolbar button.
  2. Click the first point, or type X,Y and press Enter for an exact coordinate.
  3. Click each subsequent point — each click adds a segment. Coordinate entry works at every step.
  4. Press Enter or Space to finish (requires at least 2 points placed).
●──────●
1st 2nd
\
\ segment 3 (in progress — cursor here)
● ← click to add, Enter/Space to finish

Pressing Escape at any time discards all placed points and exits the command.

Coordinate entry

Instead of clicking, type an exact position for any vertex:

  1. Type the X value.
  2. Press , — the terminal shows [X], [Y{cursor}].
  3. Type the Y value.
  4. Press Enter to place the vertex.

Angle locking and exact segment length

The same 45° snap logic as the Line command applies between any two consecutive points. When locked to an axis:

KeyAction
09, .Append digit to the segment length
-Negative length — reverses direction along the axis (first character only)
BackspaceDelete the last typed character
EnterPlace the next point at the typed distance

The current accumulated length appears in the terminal prompt in real time. Clicking while locked projects onto the axis so the new vertex lands exactly on it.

Keyboard reference

KeyAction
09, ., -Start X coordinate entry, or segment length when angle-locked
,Lock X and move to Y entry
BackspaceDelete last typed character
EnterConfirm typed coordinate or length, or finish the polyline if nothing is typed and ≥ 2 points exist
SpaceFinish the polyline (same as Enter when no input is in progress)
EscapeDiscard all points and exit

Grip editing — vertices and segment midpoints

A selected polyline shows two types of grips:

GripPositionWhat it does
VertexAt each placed pointDrag to reposition that vertex; all connected segments stretch to follow
Segment midpointCentre of each segmentDrag to translate both endpoints of that segment together, keeping the segment length and angle intact

The segment-midpoint grip is unique to polylines — it lets you slide an individual segment sideways without changing its length. On a Line, the midpoint grip instead activates the Move command for the whole entity.

There is no single "move the whole polyline" grip. To move the entire path use the Move command.

Selecting polylines

MethodBehaviour
ClickSelects the polyline if the click lands within hit-test distance of any segment
Drag right (strict)All vertices must fall inside the box
Drag left (crossing)Any segment that crosses the box boundary selects the whole polyline

Because a polyline is one entity, a crossing selection that touches any segment selects all segments.

Supported edit commands

Polylines support all general transformations and offset, but not trim or extend (those are Line-only):

CommandWhat happens to the polyline
MoveTranslates all vertices by the same displacement
CopyCreates an identical polyline at a new position
RotateRotates all vertices around the chosen base point
MirrorReflects all vertices across the mirror axis
ScaleScales all vertices uniformly from the base point
OffsetCreates a parallel polyline at a fixed perpendicular distance
DeleteRemoves the polyline from the drawing

Properties

When a polyline is selected the properties panel shows:

General

PropertyDefaultMeaning
Color256 (ByLayer)ACI color index
Layer0Layer assignment
LinetypeByLayerNamed linetype pattern
Linetype Scale1Scale factor on the linetype pattern
Thickness0Extrusion thickness

Geometry

PropertyMeaning
ClosedWhether the last vertex connects back to the first
Vertex CountTotal number of vertices
VerticesCoordinate list of all vertices

Polyline vs Line — when to use which

PolylineLine
Entity countOne LWPOLYLINE for the whole pathOne LINE per segment
Closed shapeYes (close flag)No
Trim / ExtendNoYes — segment by segment
Segment-midpoint gripTranslates the whole segmentActivates Move for the entity
Best forOutlines, contours, shapes you keep wholeConstruction lines, geometry you'll trim

DXF — LWPOLYLINE entity

Polylines are saved as LWPOLYLINE entities in the DXF file. All properties — vertex coordinates, closed flag, color, layer, linetype, linetype scale, and thickness — round-trip without loss. Rectangles drawn with the Rectangle command also save as LWPOLYLINE (closed, four vertices) and are indistinguishable at the DXF level.

LWPOLYLINE entities from any DXF-compatible application (AutoCAD, LibreCAD, etc.) are read back as fully editable polylines in the editor.