Next: , Previous: CADAddLine, Up: CAD areas and methods


6.19 CADAddPolyLine

CADAddPolyLine adds a Polyline to a drawing or a block.

IO Parameter Type Description
in theCADArea longint Area ID
in theBlockID longint A Block ID or kCADRootBlockID for the root drawing
in theLayerOrSubLayerID longint Layer ID or Sublayer ID
in thePolyIsClosedFlag integer A boolean constant (see Polyline)
in theVerticesX array of real Each array element is an X-coordinate of a Polyline vertex
in theVerticesY array of real Each array element is an Y-coordinate of a Polyline vertex
in theLineWidth real Linewidth (also see Linewidth and linetype restrictions)
in theLineTypeID longint Linetype ID or a linetype ID constant
in theLineColor longint Color or a color constant
in theFillStyle integer A fill style constant, see Fill
in theFillColor longint Color or a color constant
in theHatchID longint A Hatch ID or hatch ID constant
out theNewObjID longint Object ID of the new object
out function result OSErr Error result code, also see Error handling

Remarks
An open polyline must have at least two vertices. A closed polyline must have at least three vertices. An open polyline can not have a hatch or a fill. The surface area of an open polyline is 0. A polyline doesn’t have a rotation. If you need a rotation field for programming purposes, call CADSetPolyAngle to maintain that field yourself.

Important
Don’t close the polyline by duplicating the first vertex as the last vertex (as in 4D Draw). Instead, set the thePolyIsClosedFlag to kCADTrue.

Related methods
CADObjLine, CADObjPolyLine, CADGetPolyLine, CADSetPolyLine, CADGetPolyAngle, CADSetPolyAngle, CADPolyBounds, CADPolyUndouble, CADPolyCalc, CADSplitPoly, CADSplitPolyXY, CADPointInPoly, CADCheckPoly, CADPolyAndPoly.