![]() |
【转帖】error opening drawing
error opening drawing
error opening drawing hi, the attached drawing causes the following error when being opened by odamfcappdll.exe (dwgdirect 2.3.1): code: object of class acdblayertable can't be cast to acdbdictionary. autocad 2004 does not generate any error with this drawing and opens it fine. interestingly, the dwgdirect 1.14.02 library opened the drawing without any error, although the text in the title box was incorrectly positioned. how can i correct this problem? regards, sijmen. attached files there is a layertable attached to block as an extension dictionary. use 'recover' to open such files. vladimir quote: originally posted by sijmen interestingly, the dwgdirect 1.14.02 library opened the drawing without any error, although the text in the title box was incorrectly positioned. acad calculates text position during loading dxf fle (in case text has justify no "left"). you may also calculate it. see implementation command adjusttext (_adjusttext_func() in excustobj project file drxdebugcmds.cpp). best regards, sergey z. hi, i experienced similar problem with text positioning in attached file. while opening in odamfc example, text in bottom block is incorrectly positioned. any of your sugestions doesn't help (neither 'recover' option nor command adjusttext). autocad reports errors during audit on this file, however text is correctly positioned. in odamfc example, while repositioning whole block the text returns to its correct postion. is there a bug on dwgdirect side? i use dwgdirect 2.3.1. regards przemek attached files (36.4 kb, 1 views) hello przemek, there is problem with implementation adjusttext command here. you have attribute in block reference and you may change this command by next way: code: oddbentityptr pent = pentiter->entity(oddb::kforwrite); oddbtext* ptext = (oddbtext*)pent->queryx(oddbtext::desc()); if(ptext) { ptext->adjustalignment(); ptext->release(); } else { oddbblockreferenceptr pblref = oddbblockreference::cast(pent); //->queryx(oddbblockreference::desc()); if ( !pblref.isnull() ) { oddbobjectiteratorptr attriter = pblref->attributeiterator(); while (!attriter->done()) { oddbobjectid id = attriter->objectid(); oddbtextptr ptextattr = id.openobject(oddb::kforwrite); ptextattr->adjustalignment(); attriter->step(); } } } best regards, sergey z. thanks regards przemek |
所有的时间均为北京时间。 现在的时间是 02:20 AM. |