After reading other topics, I understand that, within an entity observer’s onEraseEntity method, I cannot access information from within the erased entity.
Is there an observer (or other way) to get an event that something is about to be deleted?
What I do with my current software is make the user use my UI to delete one of my entities. When this happens, I check to see what the entity is, and is it associated (via attribute information) with another entity.
For example, when a user deletes a window, I check to see what wall it belongs to. And then I close the hole in the wall as well as deleting the window.
The problem is, of course, the user can just select the window and delete it the old fashion way in sketchup. This leaves a hole in the wall. What I need to do is:
-see that the window is going to be deleted
-get relevant information out of the window’s attributes
-allow the delete to happen
-close the hole in the wall
If I cannot do this with an observer, does anyone know how I might go about this?
Thanks in advance for your help. You guys always have great insight and ideas. My project would be stuck in the mud without you.