ObjectARX Reference Guide > AcDb Classes > AcDbPolyline Class
Class Hierarchy
class AcDbPolyline : public AcDbCurve;



AcDbPolyline is often called a lightweight polyline because of its efficient use of memory. AcDbPolyline provides greater performance and reduced overhead compared to AcDb2dPolyline. Its database representation is more efficient because it is stored as a single object with a single name, handle, type, space, layer, and width. 


A lightweight polyline has:

  • Straight line segments
  • Bulge (arc segments)
  • Constant and variable width
  • Thickness

Functionality and command options not available in a lightweight polyline include:

  • Arc Fit curve data
  • Spline Fit data
  • Curve fit tangent direction data

The lightweight polyline is created with the PLINE command and edited with the PEDIT command. When creating or editing lightweight polylines, the command options for PLINE and PEDIT remain the same as in previous releases. 

The PEDIT command edits lightweight polylines in the same manner as AcDb2dPolyline in previous releases. If the Spline or Fit option is entered, then the lightweight polyline is converted to an AcDb2dPolyline for the duration of the edit. The handle is always maintained; it does not change. The handle of the lightweight polyline becomes the handle for the AcDb2dPolyline (the header entity for the old style polyline entity that contains subentities). 

Grip behavior is identical to that of AcDb2dPolyline. Behavior with all AutoCAD edit commands also remains the same. 

Lightweight polyline properties include color, layer, linetype, ltype scale, width, and thickness. All properties apply to the entire object and cannot vary between individual segments.


The AcDbPolyline class overrides the AcDbEntity::saveAs() method. AcDbPolyline::saveAs() does not call the entity's worldDraw(), nor does it draw graphics for proxies. Therefore, you need to implement your own saveAs() method to generate graphics when AutoCAD is obtaining proxy graphics on any objects of your class. 

If you derive a custom class from AcDbPolyline and want to support the extended intersection osnap for all pline segments, you must implement the virtual function subIntersectWith() in your custom class; you cannot rely on the inherited version.


The number of vertices in a lightweight polyline must be greater than one. A polyline with 0 or 1 vertices should not be posted or left remaining in the database.

See Also