objectArx 如何删除实体的xData
objectArx 如何删除实体的xDataads_name eNam;
ads_point pt;
int ret;
ret = acedEntSel(ACRX_T("\n选择一个实体 :"), eNam, pt);
if (RTNORM != ret)
return;
AcDbObjectId ObjId;
acdbGetObjectId(ObjId, eNam);
AcDbEntity *pEnt = NULL;
Acad::ErrorStatus es = acdbOpenAcDbEntity(pEnt, ObjId, AcDb::kForWrite);
resbuf *xdata = pEnt->xData(NULL);
if (xdata)
{
xdata->rbnext = NULL;
pEnt->setXData(xdata);
acutRelRb(xdata);
}
pEnt->close(); gzxl 发表于 2018-5-12 22:21
我原来这样写的
resbuf *xdata =NULL;
pEnt->setXData(xdata);
但不成功,谢谢你的分享:handshake
页:
[1]