几何尺寸与公差论坛------致力于产品几何量公差标准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 model space. why

empty model space. why?
empty model space. why?
hi, here attched you can find a dwg file.
when i try to import it i find that the model space
has non entities.
the code i use is:
oddbblocktablerecordptr pms = pdb->getmodelspaceid().openobject();
oddbobjectiteratorptr pentiter = pms->newiterator();
oddbobjectiteratorptr pentiter = pblock->newiterator();
for (; !pentiter->done() ; pentiter->step()) {
oddbobjectid entid = pentiter->objectid();
if(!entid.isnull() && entid.isvalid()) {
importentity(pdb, entid, list);
}
}
but no entites is loaded.
if i import the same file with brava free dwg i can see it correctly.
what am i doing wrong ?
thank you very much in advance.
bye,
federico
attached files
how do you read the drawing?
you may build our odreadex sample and debug with it.
vladimir
hi vladimir,
i have tried with odreadex and it works.
i use:
pdb = m_dxfdwgserver.recoverfile( m_dxfdwgserver.createfile(pszfile), &aiinfo );
to read the file.
if, as in odreadex, i use
pdb = m_dxfdwgserver.readfile( pszfile, false, bpartial, oda::ksharedenyno );
i have no problems.
can you tell me why in my situation i have not success?
thank you in advance.
bye,
federico
replace readfile with recoverfile in odreadex, and rebuild it. i think you'll get the same result.
then compare this sample with your application, step by step (services, modules, etc.).
vladimir
hi vladimir,
i have substituted readfile with recoverfile as in my project and i find
the same behaviour.
what i mean is that with recoverfile no entites has been found in the block.
infact in file dbdumper.cpp of odreadexfile at line 959:
for (; !pentiter->done(); pentiter->step())
{
/************************************************** ******************/
/* dump the entity */
/************************************************** ******************/
dumpentity(pentiter->objectid(), indent+1);
}
the condition pentiter->done is immediatly true.
if, instead, i use readfile this condition is not immediatly true.
what am i doing wrong?
bye,
federico
i can't reproduce that.
what dd version do you use?
vladimir
hi vladimir,
i am using 2.4.0 version.
if i use my previous version of opendwg (2.2.0) it works correctly.
i attach here the output files obtained by odreadex.exe: one is obtained with readfile instruction and the other by recoverfile. as you can see they are quite different.
i hope to have helped you.
bye,
federico
attached files (434.2 kb, 1 views)
(30.5 kb, 0 views)

hi vladimir,
by odreadex i have created a dump with dbaudit:rinterror function.
i attach here the dump.
i hope it can help you.
bye,
federico
attached files (38.4 kb, 1 views)

recover for dwg files is broken in 2.4.0
in 2.4.1 it's broken for dwg r18 (ac2004-2006) files.
2.4.2 (to be release in a week) will contain the fix.
sergey slezkin
i will wait for the fix.
thank you,
federico
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】determining model space object from vectorizer module yang686526 DirectDWG 0 2009-05-04 07:23 PM
【转帖】conversion of model space entity to paper space yang686526 DirectDWG 0 2009-05-04 06:10 PM
【转帖】请教用arx实现model space与 paper space之间的相互切换 yang686526 ObjectARX(C++) 0 2009-04-18 08:40 PM
【转帖】how to transform a point in sketch space to assembly space yang686526 SolidWorks二次开发 0 2009-04-13 12:04 PM
【转帖】model 3d space in winforms yang686526 SolidWorks二次开发 0 2009-04-12 09:48 PM


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


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