C++
Acad::ErrorStatus insertVertexAt( AcDbObjectId& newVertId, const AcDbObjectId& indexVertId, AcDb2dVertex* pNewVertex );
Description
This function inserts the AcDb2dVertex object pointed to by pNewVertex into the vertex list of the polyline just after the AcDb2dVertex object with objectId indexVertId, establishes the polyline as the vertex's owner, and adds the vertex to the AcDbDatabase that contains the polyline (the polyline must be database-resident for this function to succeed).
To insert a vertex at the beginning of the polyline, pass in AcDbObjectId::kNull for the indexVertId argument.
The inserted vertex must be explicitly closed by the calling application after the insertVertexAt() call returns.
Returns Acad::eOk if successful. If the polyline is not yet database-resident, then Acad::eNoDatabase will be returned.
Parameters
Parameters | Description |
---|---|
newVertId | Output object ID of pNewVertex |
indexVertId | Input objectId of the vertex in the polyline after which the new vertex is to be inserted |
pNewVertex | Input pointer to vertex to be inserted |