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

yang686526 2009-05-07 12:42 PM

【转帖】recover function
 
recover function
recover function
i'm using 1.12.04. i have a few dxf files i can load into autocad but not into dwgdirect. i tried using the recover method in the library, but it doesn't seem to make a difference. am i calling it correctly?
code:
odinitialize(&svcs);
theprotocolextensions.initialize();
oddbauditinfo aiinfo;
bool myerr = false;
try
{
pdb = svcs.recoverfile(svcs.createfile(infilename), &aiinfo);
if (!pdb.isnull())
{
dbdumper dumper;
dumper.dumpheader(pdb,&svcs, report);
}
}
catch (oderror& err)
{
odstring msg = svcs.geterrordescription(err.code());
report << "\n -> error thrown during readfile: " << msg.c_str() << std::endl << std::endl;
myerr = true;
}
catch (...)
{
theprotocolextensions.uninitialize();
oduninitialize();
return false;
}
if (myerr)
{
report << "\n errors: " << aiinfo.numerrors() << " fixed: " << aiinfo.numfixes() << "\n";
theprotocolextensions.uninitialize();
oduninitialize();
return false;
}
attached files
the dxf file contains "non-standard" - unknown header variables. dd fails to skip them if they have more than 1 line of data (for example 10,20,30 group codes)
this will be fixed in next release or update.
sergey slezkin


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