几何尺寸与公差论坛------致力于产品几何量公差标准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-04, 02:46 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】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.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】problem importing dxf file in sw2008 sp 4.0 - but no problem yang686526 SolidWorks二次开发 0 2009-04-13 01:34 PM
文件系统的操作 cad DirectDWG 0 2007-01-28 04:26 PM


所有的时间均为北京时间。 现在的时间是 08:20 PM.


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