![]() |
【转帖】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 |
所有的时间均为北京时间。 现在的时间是 02:43 PM. |