how to modify vertex of AcDb3dPolyline which is not in database

how to modify vertex of AcDb3dPolyline which is not in database

475867377
Advocate Advocate
349 Views
1 Reply
Message 1 of 2

how to modify vertex of AcDb3dPolyline which is not in database

475867377
Advocate
Advocate

the pPolying is AcDb3dPolyline which is not in database.i want to modify its vertex like the follow picture,but it failed,return eNoDatabase error.i want to know how to modify the vertex.

 

475867377_0-1707113762368.png

 

0 Likes
Accepted solutions (1)
350 Views
1 Reply
Reply (1)
Message 2 of 2

tbrammer
Advisor
Advisor
Accepted solution

Your are using the iterator wrong. Try this:

	AcDbObjectIterator *it = pPolying->vertexIterator();
	if (it)  {
		for (it->start(); !it->done(); it->step())	{
			AcDb3dPolylineVertex* pVertex = AcDb3dPolylineVertex::cast(it->entity());
			if (pVertex)
				es = pVertex->setPosition(pt);
				// Don't delete pVertex!
		}
		delete it; // But delete the iterator when you are done with it
	}

 


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

0 Likes