查看单个帖子
旧 2009-05-07, 12:42 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】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
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)