几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】finding xrefs using oddbxrefgraph (http://www.dimcax.com/hust/showthread.php?t=16321)

yang686526 2009-05-05 10:58 AM

【转帖】finding xrefs using oddbxrefgraph
 
finding xrefs using oddbxrefgraph
finding xrefs using oddbxrefgraph
if i have an acad drawing with xrefs with absolute paths, and these path's doest'n exist on the system running the parser,
the following code doesn't return any xrefs.
all xrefs are in the same directory as the root file.
i copied the code from the odamfc app.
is this by design or is it a bug?
thanks!
/jonas
void trace(oddbxrefgraphnode* pnode )
{
odstring sfilename;
if(pnode->owner()->rootnode() !=pnode )
{
sfilename = getfilename(pnode);
}
else
{
sfilename = "current";
}
atltrace( _t("%d\t%s\n"), l, sfilename.c_str() );
int n = pnode->numout();
for(int i=0; i<n; ++i)
{
trace((oddbxrefgraphnode*)pnode->out(i );
}
}
void testxrefs( oddbdatabaseptr pdb )
{
oddbxrefgraph res;
oddbxrefgraph::getfrom( pdb, res);
trace( res.xrefnode(0),0 );
}
it's only with r14 drawings i see this
it's acad r14 drawings and if i iterate through the blocks all
the blocks return "oddb::kxrfunreferenced"
if( pblock->isfromexternalreference() )
{
if( pblock->xrefstatus() == oddb::kxrfunreferenced )
{
// r14 always return unreferenced
}
}
it's only with r14 drawings i see this
it's acad r14 drawings and if i iterate through the blocks all
the blocks return "oddb::kxrfunreferenced"
if( pblock->isfromexternalreference() )
{
if( pblock->xrefstatus() == oddb::kxrfunreferenced )
{
// r14 always return unreferenced
}
}


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