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

yang686526 2009-05-04 06:21 PM

【转帖】corrupted dwg file
 
corrupted dwg file
corrupted dwg file
hi ,
is there way to detect a corrupted file before loading it to the database. the open dwg used to have a function (addwgsmellsbad) which could detect a corrupted file.
i need to put a check in my codes before opening the dwg file.
( some function to check if input file is not corrupt )
pdb = svcs.readfile(odinfilename.c_str(), true, false, oda::ksharedenyno);
where is no way to check if the file is corrupted without loading it.
readfile() may throw exception in case of corrupted file.
where is also oddbhostappservices::recoverfile() function which reads file more carefully and reports defects found while loading. if loading succeeds recoverfile() file calls oddbdatabase::audit().
sergey slezkin


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