查看单个帖子
旧 2009-05-05, 09:33 AM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】erasing the nonrectclipentity attached to a paperspace viewp

erasing the nonrectclipentity attached to a paperspace viewp
erasing the nonrectclipentity attached to a paperspace viewport
hi,
we have command "erase entity" in our application. it is similar to the autocad command "erase". when we pick an entity, we call the oddbobject::erase(true) function to delete it. but when we pick a viewport with attached non-rect clipping entity - it selects eighter the entity or the viewport and erases one of them - after that the system crash.
i know i can check with the oddbdatabase:urge() function (which checks the hard references) that i cannot delete an entity and probably it will work here, but the question is - how can i detect that when i pick an entity i must delete another entity into the drawing too? i want both the viewport and the attached entity to be erased (as it is in autocad).
thank you very much in advance.
best regards
chudomir
for non-rect viewport oddbviewport::nonrectclipentityid() returns id of entity defining the boundary.
the entity forming viewport's clipping boundary has viewport id among it's persistent reactors.
if you want to select/erase them both at once your application should take care about it using the information above.
odamfcapp has no problems with erasing one of such entities. probably your application tries to open erased viewport boundary and does not handle the situation than it's erased correctly.
sergey slezkin
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)