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

exporting to dwf with low memory footprint
exporting to dwf with low memory footprint
hi,
i'm trying to export a dwg file to a dwf, while making a small as possible run time memory footprint.
when loading the dwg using a partial load, it works fine, up until exportdwf is called, which consumes all of the memory (as thus making the partial load ineffective).
i've tried using my custom-made page controller (same as the one used in odwriteex) - both kpage and kunload are used.
doesn't work, since one specific method causes all of the memory allocation: cdwfexportimpl::draw() -> which calls m_pdevicedwf->update();
the update method is a native dwgdirect library function, and while it's running i can't page any objects (and after it's done running, it's too late since too much memory is consumed already).
note: using meterprogress to page objects while exporting doesn't help here, since it's not being called while the native update method is running.
i've also tried to export only parts of the dwg:
removing some layers before exporting. doesn't work since this doesn't remove the entities within those layers.
removing some of the entities before exporting. doesn't work, since oddatabase->purge method iterates through all of the database's entities and consumes all of the memory.
my question is this:
is there any way to export to dwf without making a large memory footprint? can this be achieved by exporting only part of the dwg (and if so, how can it be done without consuming a lot of memory)?
thanks,
yaron
last edited by yaron.budowski@c4-security.com; 15th february 2009 at 09:37 amfff">.
you may attach database reactor and call paging from there (every 100 objects e.g.)
not sure if it will work, but it's worth trying.
vladimir
i checked my reactor idea, and it is not working - there is no notification called when the object is loaded from disk.
you may patch dwf export: overload regenabort() virtual function in oddwfdevice and call oddbpageobjects() there from time to time.
to build dwf export you will need autodesk dwf toolkit. it may be freely downloaded from their site.
unpack dwf toolkit to \thirdparty\dwftoolkit-7.3 directory
vladimir
quote:
originally posted by vkalinin
you may patch dwf export: overload regenabort() virtual function in oddwfdevice and call oddbpageobjects() there from time to time.
to build dwf export you will need autodesk dwf toolkit. it may be freely downloaded from their site.
unpack dwf toolkit to \thirdparty\dwftoolkit-7.3 directory
thanks for the reply - i've checked it out, and it seems that regenabort is called for the first time after most of the memory is already consumed.
last edited by yaron.budowski@c4-security.com; 17th february 2009 at 05:37 amfff">.
you may also try to overload regenabort in oddwfview - it seems to be called more often.
vladimir
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】export to dwf v6.0 not working in oddwfexportex - dd rel 2.2 yang686526 DirectDWG 0 2009-05-05 10:27 AM
【转帖】dwf read yang686526 DirectDWG 0 2009-05-05 07:52 AM
【转帖】dwf printing problems yang686526 DirectDWG 0 2009-05-05 07:51 AM
【转帖】dwf export problem yang686526 DirectDWG 0 2009-05-04 08:19 PM
【转帖】dwf export has memory leak yang686526 DirectDWG 0 2009-05-04 08:17 PM


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


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