# 3DPOLY in AutoCAD

> How AutoCAD's 3DPOLY (3P) works: a 3D polyline of straight segments, each point at its own Z, with Close and Undo, and how it differs from PLINE. Try it free.

3DPOLY draws a 3D polyline: straight segments through points that each have a Z of their own, as one object. Give the start point, then an endpoint for each segment, until Enter ends it; even a start point alone is kept, as a polyline of one vertex. Enter at the start point is refused with `Invalid point.`: there is no Continue option, which LINE has. A point typed with a Z keeps it, `30,0,15`; one typed without, or clicked, lies at the elevation of the work plane, and a point snapped to an object takes the object's Z there. Points are read in the current UCS.

Unlike a [`PLINE`](https://mellowcad.com/docs/commands/pline.md) it has no plane, no arcs, no widths and no thickness, and it is drawn continuous whatever its linetype, which it keeps. The whole polyline is one step that `U` takes back; Escape keeps what was drawn. PEDIT edits it with a shorter list of options, and its Spline curve fits a smooth curve to it.

- **Command:** `3DPOLY`
- **Aliases:** `3P`
- **Panel:** [Draw](https://mellowcad.com/docs/commands.md#draw)
- **Try it:** [Open the editor](/draw), type `3P` and press Enter.

## At the command line

The engine draws it and writes its history as you would type it: the prompts in AutoCAD 2027's order, with the same option letters.

A 3D polyline climbing 15 at each corner of a 60 by 40 rectangle on the ground, seen from the south-east.

```text
Command: 3DPOLY
Specify start point of polyline: 0,0,0
Specify endpoint of line or [Undo]: @60,0,15
Specify endpoint of line or [Undo]: @0,40,15
Specify endpoint of line or [Close/Undo]: @-60,0,15
Specify endpoint of line or [Close/Undo]: @0,-40,15
Specify endpoint of line or [Close/Undo]:
Command: -VIEW
Enter an option [Orthographic]: SEI
Regenerating model.
Command: ZOOM
Specify corner of window, enter a scale factor (nX or nXP), or [All/Extents/Previous/Scale/Window/Object]: 0.8x
```

## Options

### `Close` (`C`)

From the second segment on: draws a segment back to the start point and ends.

### `Undo` (`U`)

Takes back the last vertex, and goes on from the one before it. With no segment left: `All segments already undone.`.

## What it does not do yet

A curve-fitted 3D polyline reads None in the Properties palette's Fit/Smooth, which AutoCAD calls Quadratic or Cubic, and cannot be changed there. It cannot be a hatch boundary or ARRAYPATH's path, and the palette has no Material row. Dynamic input asks the start point in one box, its Z typed after a second comma, where AutoCAD shows X, Y and Z fields. The grips' hover menus, Stretch, Add Vertex, Remove Vertex and the rest.

[What it does and still lacks, in detail (in English)](https://github.com/ovelilla/mellowcad/blob/main/docs/coverage/draw.md#3dpoly--3p--es-3dpol--3p--pt-br-poli3d--p3)

## Questions

### What is the shortcut for 3DPOLY in AutoCAD?

`3P`, then Enter or Space. The full name works too, and `_3DPOLY` in any language of AutoCAD.

### What is the difference between PLINE and 3DPOLY?

A [`PLINE`](https://mellowcad.com/docs/commands/pline.md) lies in one plane and can have arcs and widths. A 3D polyline has only straight segments, but each vertex can be at a different height: a pipe run, a road's centre line, a cable.

### How do I draw a 3D polyline at different heights?

Type each point with its Z, `x,y,z`, or snap to objects at the heights you want. Under dynamic input a point after the first is relative: `60,0,15` goes 60 along X and 15 up from the last one.

### How do I make a 3D polyline smooth?

[`PEDIT`](https://mellowcad.com/docs/commands/pedit.md) it and choose its Spline curve: a smooth curve framed by the vertices. Decurve straightens it again.

## Related commands

- [PLINE in AutoCAD](https://mellowcad.com/docs/commands/pline.md)
- [PEDIT in AutoCAD](https://mellowcad.com/docs/commands/pedit.md)
- [SPLINE in AutoCAD](https://mellowcad.com/docs/commands/spline.md)
- [UCS in AutoCAD](https://mellowcad.com/docs/commands/ucs.md)
