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