Erase entities from modeless dialog
您需要 登录 才可以下载或查看，没有账号？立即注册
I'm having problems erasing entities from a modeless dialog.
Problem #1 - I know I need to iterate the Model Space Block Table Record, open
each entity for write and call erase() on it. The code is execuated without
errors but the entities are still displayed on the screen.
Problem #2 - When I select the entities for modifications, AutoCAD shows an
unhandled exception dialog.
How do I solve these problems?
Because the dialog is modeless, explicit document locking is needed. Also
because its a modeless dialog, graphics display update is not performed (unlike,
for example, working from a modal dialog), so you'll need to do that explicitly
The following code snippet solves both the above mentioned problems.