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