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

layer on/off
layer on/off
hi,
i posted a query about this before christmas, but have received no response, so i thought i'd try again. i'm using dd 2.2.
i have a couple of layers turned off when i read in my dwg file. on each of these layers there are a couple of entities. when i initially display the file, these entities/layers are not displayed, which is what i would expect. however, if i call setisoff(false) for any of the layers, the entities already on the layer are still not displayed, though if i add new entities to the layer they are correctly displayed.
so what is it about the entities already on the layer which stops them being displayed? if i switch on the layers, and save the file, then reload it, the hidden entities are now correctly displayed.
it works fine in odamfxapp (of course!), but i can't see what the difference is between the two apps.
i'd really appreciate some help on this one, since i've been battling with it for some time now.
regards
ali smith
hi,
the only thing i see now why it could happen is that gs cache is not notified properly when layer's state is changed. default db->gs notification mechanism is encapsulated into odgslayouthelper. implementation for this object is being created inside oddbgsmanager::setupactivelayoutviews() and returned to caller. make sure you don't release it (don't ignore returned pointer; see odamfcapp/dwgviewer.cpp).
if nothing will help, try reduce your application down to small example illustrating the problem.
yes, i maintain the returned pointer from setupactivelayoutviews().
one thing i've noticed since i posted my original query, is that if i move the entities, so calling setposition() or equivalent depending on the entity type, the entity shows fine. don't know if this helps.
in the meantime, i'll try to reduce my app down to as small as i can get it to demonstrate the problem.
could your problem be related to the problem i described in this post:
i have not heard anything in response to my query.
we were able to work around the problem as described in the linked post (maybe you could try our workaround?), so we are not waiting on a fix. however, if possible, we would like some acknowledgement from oda as to whether or not oda believes that this is a real problem and whether or not they will make a fix in the future.
hi wageoghe,
i've found a work around now as well - by using winopengl instead of wingdi! this works exactly as i would expect. so it must presumably be a bug in the wingdi.gs code.
i saw your post when i was scanning for any clues, but we're using dd 2.2 which is much simpler to use than the 1.3 implementation. however, i must say that there did seem to be similarities, with one layer seeming to behave differently to the others, depending on which layer you played with first.
did you try using winopengl instead of wingdi?
yes, i see that entities are not redrawn when are modified in gdi gs...
it's definitely a bug, we'll take care about it.
it's fixed.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】urning the mark for drawings onoff yang686526 SolidWorks二次开发 0 2009-04-13 03:05 PM
【转帖】oggle onoff welded config sane strings yang686526 SolidWorks二次开发 0 2009-04-13 02:59 PM


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


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