C++
Acad::ErrorStatus insertVertexAt( const AcDb2dVertex* pIndexVert, 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 pointed to by pIndexVert and establishes the polyline as the vertex's owner. In addition, if the polyline is resident within an AcDbDatabase, the vertex will be added to the same database. If the polyline is not database-resident, then when it is added to a database, the vertex will be added as well.
To insert a vertex at the beginning of the polyline, pass in a NULL for the pIndexVert argument.
If the polyline is database-resident then the inserted vertex must be explicitly closed by the calling application after the insertVertexAt() call returns. If the polyline is not database-resident, then there is no need to close the vertex since it hasn't been added to the database yet (calling close() on such a vertex will just result in close() returning Acad::eNoDatabase).
Returns Acad::eOk if successful
Parameters
Parameters | Description |
---|---|
pIndexVert | Input pointer to vertex in polyline after which the new vertex is to be inserted |
pNewVertex | Input pointer to vertex to be inserted |