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

complex models, running out of memory.
complex models, running out of memory.
i am trying to use directdwg to load autocad models, and convert them to my 3d format. everything works fine, except for really complex models. it seems that directdwg must load the whole file into memory, which for these models will exceed the 2gb memory limit on windows platforms, then i get an excetion, i assume out of memory thrown by the library. is there anyway around this, i.e. virtual memory(on disk) manager, or a way to reduce the overhead?
thanks,
quincy
if such file contains a large number of objects partial loading and paging may help. (see developer's guide/paging support).
but if 2g file contains single huge object where is nothing to do...
sergey slezkin
thanks, yes it is definately a large number of semi-complex objects. i will look into this, but i am sure this is what i am looking for.
thanks,
quincy
quote:
originally posted by sergey slezkin
if such file contains a large number of objects partial loading and paging may help. (see developer's guide/paging support).
but if 2g file contains single huge object where is nothing to do...
ok, i believe i have the paging setup properly according to the developer's guide. however, i am not seeing any processing, or memory reduction in the svcs.readfile() function. it takes the same amount of time/memory to loadno matter what the bpartial flag is set to? therefore it still seems it is loading the whole file right then, and even with paging it still gets really large heap sizes? what else could i be doing wrong?
thanks,
quincy
what is file type and version? and which dd version?
partial loading does not work for dxf and dwg r12.
and partial loading for dwg r13-r15 was implemented in one of latest dd versions.
sergey slezkin
quote:
originally posted by sergey slezkin
what is file type and version? and which dd version?
partial loading does not work for dxf and dwg r12.
and partial loading for dwg r13-r15 was implemented in one of latest dd versions.
i believe it is dwg file from autocad 2005. it appears that i am running directdwg 1.13 from 6/23/2005. is this version recent enough? i am currently trying to migrate to 1.14, but for some reason i now get linker errors:
error lnk2001: unresolved external symbol "public: virtual bool __thiscall oddbhostappservices::getdelobjs(void)const " (?getdelobjs@oddbhostappservices@@ube_nxz)
error lnk2001: unresolved external symbol "public: virtual void __thiscall oddbhostappservices::setdelobjs(bool)" (?setdelobjs@oddbhostappservices@@uaex_n@z)
error lnk2019: unresolved external symbol "public: static unsigned long __cdecl odgirasterimage::calcscanlinesize(unsigned long,int)" (?calcscanlinesize@odgirasterimage@@sakkh@z) referenced in function "public: virtual unsigned long __thiscall odexgirasterimage::scanlinesize(void)const " (?scanlinesize@odexgirasterimage@@ubekxz)
any ideas on this also?
thanks,
quincy

dear quincy,
about unresolved externals - it seems like you're trying to use together include files for dd 1.13 and libs for 1.14. if so - it definitely not good idea, you should use corresponding include files and libraries.
sincerely yours,
george udov
i checked 1.13.0 - loading files in odamfcapp and looking at memory occupied by the application:
application occupies 5.8m before file loading
chevy.dwg from r14 samples:
full load - 25m
partial - 16m
stadium plan.dwg from ac2005 samples:
full load - 52m
partial - 28m
note that odamfcapp acceses some objects to fill tree control. the difference between full and partial load must be greater immediately after readfile().
are you checking memory in odreadex after readfile() of after odreadex finished working? note that it accesses all objects causing their loading into memory.
sergey slezkin
alright, i am definately getting a partial load on my .dwg file. the only problem now is that some of these files still are exceeded my memory limits (2gb) while loading. is there a way to force directdwg to use paging, or virtual memory during the load? this seems to be my biggest problem.
thanks,
quincy
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】are there memory leak in exportdwf function yang686526 DirectDWG 0 2009-05-04 04:10 PM
【转帖】running solidworks swp file from other programs yang686526 SolidWorks二次开发 0 2009-04-13 02:01 PM
【转帖】design table memory usage yang686526 SolidWorks二次开发 0 2009-04-13 10:16 AM
How to disable SolidWorks memory handler(C++) huangyhg SolidWorks二次开发 0 2007-01-23 10:45 PM


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


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