几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量  


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 仿射空间:CAX软件开发(三)二次开发与程序设计 » CAD二次开发 » AutoCAD二次开发 » DirectDWG
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


 
 
主题工具 搜索本主题 显示模式
旧 2009-05-04, 06:51 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】critical readfile problem in v1.09

critical readfile problem in v1.09
critical readfile problem in v1.09
readfile throws an "invalid index" exception if an r13 dwg is loaded.
i use the system services implementation in the examples/borland c++ builder 6.0.
this problem can be repeted by simply drawing 1 circle in a drawing (i did it in autocad 2002) and save it as r13 dwg. this drawing is then not possible to load with dwgdirect? or?
(i tried an r13 dxf, which failed with another critical error as well, however r14 and r12 works fine)
robert persson
rob
what dd version do you use? initial 1.09 (october) or updated (november). could you post or e-mail me the problem files?
sergey slezkin
i attached a file with my first post but it didnt seem to work (?)...can i mail it somewhere? i use the latest dd (when i fell into trouble i updated to the latest)
robert
ps: i attach a dwg this time to and we'll see if it works or not...
attached files (27.4 kb, 7 views)

rob
both odamfcapp and odreadex samples loaded your file successfuly. i used release build of stuff downloaded from oda site today. (other older versions i tried work too.) can you reproduce the crash in odreadex sample?
sergey slezkin
i havent recompiled odreadex, but my code does quite much the same. here's the start my code that loads a dwg:
int loaddwg(char* filename) {
odrxobjectimpl<myservices> svcs;
odinitialize(&svcs);
oddbdatabaseptr pdb;
non_planar_entities=false; //set to true if any entites not in xy plane is encountered
#define dwgerror() {oduninitialize();return 0;}
try {
// open the file
pdb = svcs.readfile(filename,false, false,oda::ksharedenywrite);
if(pdb.isnull())
dwgerror();
........
this code crashes with an exception in readfile, saying 'invalid index'
one intresting thing to note is some warnings i get when compiling, using the ex... files from examples folder:
[c++ warning] exhostappservices.h(58): w8022 'exhostappservices::warning(odstring)' hides virtual function 'oddbhostappservices::warning(odresult)'
[c++ warning] exhostappservices.h(58): w8022 'exhostappservices::warning(odstring)' hides virtual function 'oddbhostappservices::warning(odresult,oddbobjecti d)'
[c++ warning] exhostappservices.h(58): w8022 'exhostappservices::readfile(const char *,bool,bool,oda::filesharemode,const odwstring &)' hides virtual function 'oddbhostappservices::readfile(odstreambuf *,bool,bool,const odwstring &)'
one more thing that should be known, is that this project is an dll file, which works as an dwg loader plugin for a small cad system.
is there maybe any defines i should use becaus i use borland compiler and/or that i compile a dll file????
rob.
rob
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】color conversion problem dd 1.14.01 yang686526 DirectDWG 0 2009-05-04 05:53 PM
【转帖】cannot open a dwg file in autocad - random problem yang686526 DirectDWG 0 2009-05-04 05:28 PM
【转帖】a strange problem for oddbtext entity yang686526 DirectDWG 0 2009-05-04 03:16 PM
【转帖】vista and addin dll problem yang686526 SolidWorks二次开发 0 2009-04-13 03:19 PM
【转帖】pdm problem yang686526 SolidWorks二次开发 0 2009-04-13 01:20 PM


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


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多