[求助]关于acdbEntGetX函数
改函数取出的缓冲区列表(指定了APPNAME)是不是包括了不是扩展数据的数据? 我该怎么去里面找我的扩展数据;如果只是取出扩展数据,我的代码有错误吗?(取出了全部数据,我也不知道包含扩展数据没有)如下:struct resbuf appname = {NULL, RTSTR}, *we;
int status;
// APPNAME已经使用acdbRegApp注册成功
//
appname.resval.rstring = (char*) malloc(strlen(APPNAME) + 1);
strcpy(appname.resval.rstring, APPNAME);
ads_name wea;
AcDbObjectId ObjID;
AcDbObject *pObj = selectObject(ObjID, AcDb::kForRead);
if (!pObj)
{
acutPrintf("打开对象失败!");
}
status = acdbGetAdsName(wea, ObjID);
if (status == Acad::eError)
{
pObj->close();
acutPrintf("取得实体名称时发生错误!");
return;
}
pObj->close();
we = acdbEntGetX(wea, &appname);
if (we == NULL)
{
acutPrintf("取不到数据");
}
struct resbuf *pTmp;
pTmp = we->rbnext;
if (pTmp != NULL)
acutPrintf(pTmp->resval.rstring);
// pTmp = acutBuildList(RTSTR, "just a test", 0);
//
// we->rbnext = pTmp;
//
// status = acdbEntMod(we);
// if (status == RTNORM)
// {
// acutPrintf("OK");
// }
// else
// {
// acutPrintf("Fail");
// }
acutRelRb(we);
}
// 我主要是想用acdbEntMod修改扩展数据的内容,下面是ARX开发指南的一段
// 各位高手出招了,谢谢!
As the sample code shows, extended data retrieved by the acdbEntGetX() function can be modified by a subsequent call to acdbEntMod(), just as acdbEntMod() is used to modify normal definition data. (Extended data can also be created by defining it in the entity list passed to acdbEntMake().)
这里的人气不怎么旺呀!!!
页:
[1]