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

new oddbblocktablerecord in existing file
new oddbblocktablerecord in existing file
hi,
i have a problem adding oddbblocktablerecords to an existing file. autocad refuses to load this modified file with an error message ("...incorrect or corrupted information..."), dd returns "invalid index".
if i create a new file instead, then everything is fine.
the seedfile doesn't contain any inserts or blocks. do i have to initialize the file after loading in order to add blocks? as far as i tested it, all other entities can be added without any problems.
torsten
have you tried dd recover? autocad's recover?
could you send me the file?
sergey slezkin
hi sergey,
please find attached the files i am using / creating to examine this problem:
- seed_2.dwg - the seedfile, to which the block is added
- blocktest1.dwg - result of seedfile plus one block added
- blocktest_with_raster.dwg - result of seedfile plus one block including a raster
- testraster.gif - the included raster file
i noticed that the file blocktest1.dwg can be read with dd, but not with autocad; the file with blocks including raster is refused by both programs.
i didn't test the recover functions, but i will do this right now.
torsten
attached images (445 bytes, 3 views)
attached files (15.5 kb, 3 views)
(16.1 kb, 3 views)
(17.5 kb, 3 views)

i just checked the files in autocad with the recover command:
autocad 2005 was able to recover both files with the following log entries:
drawing recovery.
drawing recovery log.
scanning completed.
validating objects in the handle table.
valid objects 59 invalid objects 0
validating objects completed.
creating new acad_material dictionary
creating new acad_color dictionary
setting hdr acad_tablestyle dict id.
used contingency data.
salvaged database from drawing.
reading handle 39 object type acdbrasterimage
error 67 (edwgobjectimproperlyread) object discarded
2 blocks auditeds from entity lists.
pass 1 4 objects audited
pass 2 4 objects audited
total errors found 0 fixed 0
regenerating model.
i am bit confused because it says that nor errors were found, but the original file cannot be loaded...
also interesting: autocad 2000 can recover the first file, but not the second with the raster included.
torsten
1. raster image.
this problem is already fixed.
as a work around to create valid raster image set clip boundary to it or call pimage->setclipboundarytowholeimage();
2. block.
i have not figured out the problem yet. which dd version and with what compiler do you use?
sergey slezkin
hi sergey,
currently i am using dd version 1.11.00 with visual studio 6.
since autocad's recover function doesn't produce any helpful error messages, i tried the same in dxf format (see attached file: _test2.dxf). now, i am getting this error message when loading the file:
bad handle 3c: already in useexpected block, found line on line 1684.
error: block "block001" was not defined
invalid or incomplete dxf input -- drawing discarded.
is there a dd command so that handles are not used twice? or is this a bug?
torsten
attached files (4.9 kb, 3 views)

do you modify partially loaded database?
sergey slezkin

hi sergey,
yes, the file was only loaded partially. i fixed this, and now it works (even with raster).
thanks a lot!
torsten
this is our fault. in current implementation modification of partially loaded database may cause invalid results like you had. this is to be fixed.
you can load database partially but before editing/appending entities pdb->closeinput() should be called to force full loading.
sergey slezkin
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】losing objects when writing dwg file yang686526 DirectDWG 1 2011-11-24 02:10 AM
【转帖】different vectorization of same file on windows and mac yang686526 DirectDWG 0 2009-05-04 07:29 PM
【转帖】creating a sat file out of dxf solid file yang686526 DirectDWG 0 2009-05-04 06:47 PM


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


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