![]() |
【转帖】e cant open file
0x2001e "can't open file"
0x2001e "can't open file" hello, has anyone experiences a 0x2001e "can't open file" error? i am using 2.4 libraries and it occurs occasionally on pdf exports. i have search thru the opendwg libraries source and i can't decipher the meaning or where it is coming from. thanks.. hi, please, attach small example file. hi, i am still trying to look for a non-proprietary drawing to send you. in the meantime, can you verify for me if 0x2001e is an error code produced by the opendesign pdf libraries? is there a file we can download showing all the possible codes? for example, 0x10008 is a pdf error code too, right? thanks hi, errors started with 0x00010000 are export tool errors. 0x10008 is excannotrestorepaperfromlayout. you should check page setup setting for active layout. pdfexport sources are open... so you can locate the problem code. errors started with 0x00020000 are just oderror. for example 0x2001e - is 0x1e error code of oderror. ... hi, yes, i confirmed that the error code 0x2001e corresponds to the ecantopenfile oderror code. my client is getting this error in converting some of his drawing files to pdf but i could not duplicate the error in my computer. if support files like the acad.fmp or font files are not in his computer, would this cause the error? will the error also occur if the user does not have file creation rights? thanks hi, pdfexport doesn't open any font file itself. it uses toolkit functionality. so i think that error come from one of next d:\oda\dwgdirect\extensions\exservices\odfilebuf.c pp(71): throw oderror_fileexception(ecantopenfile, sfilename); d:\oda\dwgdirect\extensions\exservices\odfilebuf.c pp(312): throw oderror_fileexception(ecantopenfile, m_sfilename); d:\oda\dwgdirect\extensions\exservices\odfilebuf.c pp(332): throw oderror_fileexception(ecantopenfile, m_sfilename); d:\oda\dwgdirect\extensions\exservices\odfilebuf.c pp(366): if( m_hfilemap == invalid_handle_value ) throw oderror_fileexception(ecantopenfile, m_sfilename); d:\oda\dwgdirect\extensions\exservices\odfilebuf.c pp(369): if( !m_pfilemap ) throw oderror_fileexception(ecantopenfile, m_sfilename); so you can add break points to these code lines or dump it somehow. hi, i sent you a sample file and a screen shot directly to your email address at opendesign.com. the error occurs after the program issues the exportpdferrorcode(errcode) command. thanks hi, i am pretty sure that the error is being reported by odfilebuf.cpp and passed on to the functions: oduint32 pdfexport_dll exportpdf(pdfexportparams &pparams) and odstring pdfexport_dll exportpdferrorcode(oduint32 errorcode) in pdfexport.cpp. but it only returns the error code and the "can't open file" error message. is there any way i can find out the actual filename causing the error? thanks... oderror::description() method should include file name into the string returned in case of oderror_fileexception. sergey slezkin to all, i found out that the file causing the 0x2001e exception is "d size.ctb" during pdfexport. is there any work around if that file is not available? thanks.. pleasecheck the code around next line inside 2dexportdevice.cpp code: pctx->loadplotstyletable(pfilebuf);my current version is code: odstring pssfile(playout->getcurrentstylesheet()); if(!pssfile.isempty()) { odstring testpath = pdb->appservices()->findfile(pssfile); if(!testpath.isempty()) { odstreambufptr pfilebuf = odsystemservices()->createfile(testpath); if(pfilebuf.get()) { pctx->loadplotstyletable(pfilebuf); } } }i am not sure, but may be testpath is not empty in your case, but createfile thows exseption somehow. could you please check it... ? hi, my client has the d size.ctb in his computer but not in mine and my testpath returns empty and proceeds without an error. it turned out that my client does not have read-rights to the file, only list-rights. after adjusting rights, the program works fine now. thanks for all your help. last edited by robertpantangco@hotmail.com; 28th october 2008 at 12:41 pmfff">. reason: clarification thank you for your question. it seems that i should add some changes to our code to prevent such situations. hi, what i did was modify odfilebuf.cpp to capture the error and provide the additional information to the user on the application when the condition occurs. it was the only way for me to find out what was going on. thanks again. |
所有的时间均为北京时间。 现在的时间是 05:05 AM. |