几何尺寸与公差论坛------致力于产品几何量公差标准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-06, 11:42 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】problem writing dwg 2000, 2004 files

problem writing dwg 2000, 2004 files
problem writing dwg 2000, 2004 files
i'm using dwgdirect 1.9 libs for borland c++ builder on windows(32bit).
when i try to write the database to dxf or dwg,r14, things work fine, but
when i try to write to dwg,2000 or 2004, after a few k of the file is written, i get an exception:
oderror: "was open for write"
00ef061e _throwexceptionldtc
00c3732b oddwgwriter::writedatabase
00860c16 oddbdatabase::writefile
006470fc dwgfile::write(this=:0012f8fc)
0064f9ca dwgfromsite:rocess(this=:0012f6f0, levels=:0012fb88, resstrm=:0012f974)
00646701 exportautocad(levels=:0012fb88, filename=:0012fa58, typ=0 /* dwg */, ver=23 /* r2000 */)
oderror: "was open for write"
00ef061e _throwexceptionldtc
00c0fabb oddwgr18filewriter::wrobjects
00c09fa9 oddwgr18filewriter::writedatabase
008609a4 oddbdatabase::writefile
006470fc dwgfile::write(this=:0012efec)
0064f9ca dwgfromsite:rocess(this=:0012ede0, levels=:0012f278, resstrm=:0012f064)
00646701 exportautocad(levels=:0012f278, filename=:0012f148, typ=0 /* dwg */, ver=25 /* rev_current */)
writes ok:
00646701 exportautocad(levels=:0012f278, filename=:0012f148, typ=0 /* dwg */, ver=21 /* r14 */)
also typ of dxf works okay.
this doesn't happen for every case, and i don't have an odwriteex test case that makes this happen (i'll keep trying), so i'm hoping this info might be enough to narrow it down.
i wouldn't be surprised if its borland specific - i'd love to have the debug libs used to track down and fix
"was open for write" exception during writing a file means that some object was modified and not closed by the moment writefile() is called.
probably you have a smart pointer in your code pointing to some database object and as a result the object was not closed.
maybe r14 works because the object is not written to this file version.
sergey slezkin
thanks! i did have a pointer to a blocktablerecord that was still around.
zeroing it fixed the problem. strange that dxf and dwg r14 didn't complain..
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】losing objects when writing dwg file yang686526 DirectDWG 1 2011-11-24 02:10 AM
【转帖】problem converting .dwg 2004 to 2000 .d yang686526 DirectDWG 0 2009-05-06 10:38 PM
【转帖】nls error yang686526 DirectDWG 0 2009-05-06 06:34 PM
【转帖】geometry related questions yang686526 DirectDWG 0 2009-05-05 11:12 AM
【转帖】[求助]请求编程,查询符合要求条件的dwg文件 yang686526 数据库ObjectDBX 0 2009-04-19 05:36 PM


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


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