查看单个帖子
旧 2009-05-07, 05:45 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】units Value From Dxf

units value from dxf
units value from dxf
hi,
i have written following code for getting units of dxf file.
this code works properly for dxf file which is saved through all cad packages except one cad package(osdm).
through osdm i create a dxf file which has units mm. but following code gives me it in 'inches'. so what may be cause for this? is it related to dxf version created by cad package or something else.
oddbdatabaseptr pdb;
pdb = svcs.readfile( dxffilename, true, false, oda::ksharedenyno );
oddb::unitsvalue units = pdb->getinsunits();
and one more thing i have documentation of dwgdirect 1.14 where i did not find a method getinsunits(). please tell me in which version this method is introduced or depricated?
regards,
nikhil
insunits variable appeared in r14 version. if dxf you read is of pre-r14 version it contains no insunits. also some programm writing dxf r14 may not save insunits value to dxf.
dwgdirect of all versions have oddbdatabase::getinsunits().
(get/set methods for system variables are generated from sysvardefs.h container.
sergey slezkin
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)