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:
Functionality and command options not available in a lightweight polyline include:
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.
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.