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

yang686526 2009-05-06 07:32 PM

【转帖】oddbdatabaseversion problem
 
oddbdatabase::version problem
oddbdatabase::version problem
i run the following code:
[code]
oddbdatabaseptr pdb = dbsysserv.createdatabase(false);
pdb->setretainoriginalthumbnailbitmap(true);
pdb->readfile(“c:\\temp\\r14.dwg“, false, oda::ksharedenyreadwrite);
if (!pdb.isnull()) {
oddb:wgversion mydwgversion = pdb->version();
</pre><hr></blockquote>
mydwgversion is always kdhl_1015, also when i open a r13 or r14 drawing. when i open the c:\temp\r14.dwg drawing with a hex editor i can see string ac1014 at the beginning of the file so it is really a r14 drawing.
is this a bug or must i use another way to find out what the version of the drawing is ?
[ june 24, 2003: message edited by: oliver ]</p>

dwgdirect loads any dwg file as a dwg r15 file.

does this mean that the format() method is useless ?
is there any other way to find out what format the drawing has ?

oddbdatabase::version() returns current database version (ac15 before 1.07 and ac2004 since 1.07)
drawing is converted to current version being loaded (round-trip data processed).
if you need to know the version of file database was loaded from use oddbdatabase: riginalfileversion().
sergey slezkin

originalfileversion() works.
problem solved
thank you very much
oliver


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