高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】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
|