Comparing the AutoCAD polyline types

Confused about the various polyline types that you see in AutoCAD?

From the end user perspective there are 3 polyline types listed in the PROPERTIES command, even though there are only two “entity” types.

  • polyline – this is an LWPOLYLINE entity, always 2D.
  • 2d polyline – this is a POLYLINE entity, also 2D.
  • 3d polyline – this is a POLYLINE entity, usually 3D, with each vertex at a different elevation. It is possible to have a “3d polyline” and have each vertex at the same elevation.

If you use the LIST command on any polyline, you will only see the
entity names (POLYLINE or LWPOLYLINE).

POLYLINE entities are the original type. LWPOLYLINE entities were introduced in R14.

If PLINETYPE = 0 (zero), then the PLINE command will create POLYLINE entities.
If PLINETYPE = 1 or 2, then the PLINE command will create LWPOLYLINE entities.

To create 3d polylines, use the 3DPOLY command.

To convert between POLYLINE and LWPOLYLINE entities, use the CONVERTPOLY command.

If you are using Autolisp, you only need to worry about the entity names (POLYLINE and LWPOLYLINE.) A “3d polyline” is simply a POLYLINE entity with a special flag set. When this flag is set, each vertex subentity can be set to a different elevation.

Depending on what else you may be doing, you may also see
names like:
Acad3DPolyline, or AcDb3dPolyline
AcadPolyline, or AcDb2dPolyline
AcadLWPolyline, or AcDbPolyline