Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I am trying to loop each vertex in pline by using this code but when i try converting Acdbobject to acdbpolyline2D like .Net pPline = (PLINE2D*)obj ; however ObjectIterator did not seem to work, so I was unable to loop though objectIterator.
Where did I go wrong, please help
Here is the code I use:
extern void Loopvertex()
{
ADSN adsEnt; ADSPT adspt;
acedEntSel(_T("Let select pline"), adsEnt, adspt);
ID plineid;
acdbGetObjectId(plineid, adsEnt);
PLINE2D* pPline; Object* obj; acdbOpenObject(obj, plineId, fR); //Read pline return Acdbobject pPline = (PLINE2D*)obj; //Convert Acdbobject to Acdb2dPline ObjectI* pVertIter = pPline->vertexIterator(); // get ObjectIterator but failed
'continue code
}
Thanks in advance!
Solved! Go to Solution.

