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

yang686526 2009-05-04 04:31 PM

【转帖】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


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