几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】getting the xdata associated with an entity (http://www.dimcax.com/hust/showthread.php?t=16422)

yang686526 2009-05-05 11:33 AM

【转帖】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


所有的时间均为北京时间。 现在的时间是 06:43 AM.