高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】getting the xdata associated with an entity
getting the xdata associated with an entity
getting the xdata associated with an entity
i need to get the xdata assocciated with an entity. does dwgdirect have an equivalent for the following autocad code?
cstring getuserdefinedentityattributes( acdbentity *pent)
{
cstring returnstring;
struct resbuf *pbuf = 0;
pbuf = pent->xdata(null);
if (pbuf)
{
struct resbuf *p = pbuf;
while (p)
{
switch (p->restype)
{
case acdb::kdxfxdasciistring:
if( strlen(p->resval.rstring))
{
returnstring = p->resval.rstring;
return returnstring;
}
break;
. . .
}
p = p->rbnext;
}
acutrelrb(pbuf);
}
return returnstring;
}
xdata can be accessed using
odresbufptr oddbobject::xdata(odstring regappname = odstring()) const;
odreadex sample contains code dumping xdata.
sergey slezkin
|