怎么我增加不了。。还有选择完点就会出现异常。。。困扰了我好都天的。。。大家帮帮我 // TODO: Implement the command ads_name en; ads_point pt; if(ads_entsel("\n选择二维多线段对象:",en,pt)!=RTNORM) { ads_printf("没有选择到\n"); // return NULL; } AcDbObjectId pLineId; acdbGetObjectId(pLineId ,en); AcDb2dPolyline *pPline; acdbOpenObject(pPline,pLineId,AcDb::kForWrite); AcGePoint3d addPt; ads_getpoint(NULL,"\n请选择增加的点位置: ",asDblArray(addPt)); AcDb2dVertex *pVp=new AcDb2dVertex(addPt); //AcGePoint3d addPt(10.0,10.0,10.0); //pVp->setPosition(addPt); pPline->appendVertex(pVp); pVp->close(); //pPline->close();
|