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

invalid index
invalid index
i've a dwg file, that during zoom-rect operation (as shown in .jpg file) generates
"invalid index" exception. i test it with odamfcapp.
i think the file is broken.
is any posibility to know just after loading the file without rendering, if it is broken?
my idea is that if the file is broken then try to recover it with dwg function without informing end-user.
i attach dwg file and screen with an error.
thanks in advance
mk
attached images
the crash in 1.13 is caused by invalid linetype data. it seems to be fixed in 1.14.
after loading a drawing (readfile()) you can call pdb->audit() but safest way is to load the drawing with recoverfile() function.
sergey slezkin
besides,
i have some russian dwg files (with the unicode signs \u+xxxx...)
using readfile i translate \u+xxxx into unicode and i got cyrilica and everything was ok.
if i read it with recoverfile the letters start look strange. there were no \u+xxxx
i still have 1.13 and in the moment cannot go into 1.14
readfile() has ballowcpconversion parameter and if it's true dd converts drawing at loading time to system code page.
unfortunately recoverfile() has no such parameter and drawing is loaded "as is". it's dwgcodepage after loading differs from system code page.
strange that for years nobody noticed this problem :-(
as a workaround you can save the file after recoverfile() and load it by readfile() with ballowcpconversion = true.
sergey slezkin
hi,
is there a plan to include ballowcpconversion option in recoverfile()?
regards,
varun
no. but there is a plan to remove this parameter from readfile(). it's not used since 2.0.
because starting with ac2007 and dd 2.0 text at runtime and inside dwg file is stored in unicode. so it's impossible to avoid conversion while loading pre-2007 files and load strings "as is".
sergey slezkin
so if i use recoverfile() now (with 2.2.0), it would work the same as readfile() with ballowcpconversion == true, for the purpose of text conversion?
regards,
varun
yes. now both readfile() and recoverfile() perform conversion to unicode at file loading.
sergey slezkin
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


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

高级搜索
显示模式

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

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



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


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