查看单个帖子
旧 2009-05-04, 04:31 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】autocad version ac2.10 files

autocad version ac2.10 files
autocad version ac2.10 files
hi,
does oda support opening of older (very very old version) files? i am trying to open attached file (using oddbhostappservices::readfile() dwgdirect version 2.3.1) that is from autocad version ac2.10 and getting "bad dwg file" exception.
if oda doesn't support older version files, is there any way to know the version of dwg file before it throws oderror?
thanks.
attached files
dd supports dwg starting with kdhl_1001 (it seems to be autocad 2.5).
in dd 2.4.1 (to be released in a week) we changed error code thrown for early unsupported versions to distinguish it from ebaddwgfile.
you'll get eunsupportedearlydwgversion in this case.
the first bytes in dwg file indicate its version:
code:
odint8 buff[7];
memset(buff, 0, 7 * sizeof(odint8));
rdbytes((oduint8*)buff, 6l);
oddb::dwgversion ver = oddb::dwgversionfromstr(buff);
sergey slezkin
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)