几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】why Does This Dwg File Throw An Exception In Dd1.11 (http://www.dimcax.com/hust/showthread.php?t=19131)

yang686526 2009-05-07 07:09 PM

【转帖】why Does This Dwg File Throw An Exception In Dd1.11
 
why does this dwg file throw an exception in dd1.11?
why does this dwg file throw an exception in dd1.11?
the attached file (from one of our japanese resellers) throws an exception when passed to svcs.readfile() in the odreadex example (and in my dd app). the oderror text i get after catching it is "dwg object improperly read". can someone in the oda look at it and make a recommendation? autocad 2004 and the autovue viewer both open it successfully. thanks in advance.
attached files
this file contains a number of errors (which can be verified by doing a recover on it in autocad). dwgdirect can successfully load the file if you call recoverfile() instead of readfile(). normally if you get an exception from readfile(), you should try recoverfile() to see if the contents can be salvaged).

neil,
thanks.
i'd never noticed recoverfile(). i'll give it a try.
pete
neil,
thanks. recoverfile() worked great.
pete


所有的时间均为北京时间。 现在的时间是 01:18 PM.