本帖最后由 作者 于 2006-1-25 0:29:23 编辑
ads_name entname; ads_point ptt; AcDbObjectId entId; AcDb2dPolyline* pent; acedEntSel("\n选择多段线",entname,ptt); acdbOpenObject(pent,entId,AcDb::kForRead);//在这里出错 AcDbObjectIterator* pvertexiter=pent->vertexIterator();// pent->close(); AcDb2dVertex *pvertex; AcGePoint3d location; AcDbObjectId vertexId;
for(int i=0;!pvertexiter->done();i++,pvertexiter->step()) { vertexId=pvertexiter->objectId(); acdbOpenObject(pvertex,vertexId,AcDb::kForRead); location=pvertex->position(); pvertex->close(); acutPrintf("\n 坐标 x=%0.3f,y=%0.3f,z=%0.3f",location[X],location[Y],location[Z]); } delete pvertexiter; 该怎么调试? |