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

empty xref blocks
empty xref blocks
hi,
i just noticed that when i am loading dwg files with xrefs, the layers etc. were imported, but not the content of the xref file: a closer look revealed that the blockdef which should contain the contents of the xref was empty.
i am using oddbxrefman::reloadall(..) to load all xrefs, and it worked in the past. was there a change with the new version 1.12 concering xref handling?
torsten
hi torsten,
it's maybe a bug in 1.12. xref loading was redesigned.
send the problem dwg file please.
dmitry.

hi dmitry,
well, i am a little confused now. first, i checked the odreadex sample, and it showed the same result as my program: the xref layer was read, but not the contents of the xref. then i checked the 1.11 and 1.10 version of the sample program - same result.
all versions of the odamfcapp sample draw the complete xref, but the contents list shows an empty block for the attached xref.
so obviously your code works, and the bug is on my side. and i have no clue where it can be...
as far as i know, attached xrefs are loaded as 'normal' blocks, no special handling required except for oddbxrefman::reloadall(..). has this changed with the new version?
torsten
some functions like getting extents, rendering implicitly causes xref loading.
you can check block table record's xref status and if it is not loaded call reload (not reloadall) for that specific block. or simply call reload without "force" parameter.
sergey slezkin
sergey,
when i check the xref status of the blocktablerecords, all of them have the status kxrfnotanxref.
torsten
could you post a sample file?
sergey slezkin
sorry, sorry, sorry - yesterday i tested v1.11, and i forgot to switch back.
now, with v1.12 the xref status for the xref block is kxrffilenotfound.
i checked the path with pathname(), but it was ok.
i uploaded the two files i am working with:
xref1.dwg is the main file which contains the xref,
source_1.dwg is the external reference.
torsten
p.s.: i tried to reload the xref, but the status remained the same.
attached files (23.5 kb, 2 views)
(26.5 kb, 2 views)

last edited by torsten; 4th november 2004 at 09:15 amfff">.
update: i did some testing with the odvectorizeex sample (which reads the xref contents), and i found out, that right after the svcs.readfile(...) call the status of the xref block is kxrfunresolved. after a reload of the block, the status is kxrfresolved.
with my program, the initial status is kxrfunresolved, too, but after a reload it changes to kxrffilenotfound.
any idea what's going wrong?
torsten

finally i found it: in exhostappservices.cpp, i added the function exhostappservices::findfile( ... ) some time ago to find special fontfiles.
the error was that i returned a null-string if no fontfile could be found. i didn't think of other files i.e. xref files, which could use this function, too. now it is fixed, and the xref is loaded. and i have another problem, but i'll post it in a new thread...
thanks for your help and sorry for any inconvenience...
torsten
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】current vp freeze of xref layer that is frozen is being vec yang686526 DirectDWG 0 2009-05-04 06:54 PM
【转帖】created drawing crashes autocad yang686526 DirectDWG 0 2009-05-04 06:43 PM
【转帖】computing dimension blocks yang686526 DirectDWG 0 2009-05-04 06:04 PM
【转帖】blocks forever yang686526 DirectDWG 0 2009-05-04 04:53 PM
【转帖】如何实现xref功能 yang686526 ObjectARX(VB.NET/C#) 0 2009-04-21 09:55 AM


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


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