Archicad C++ API
About Archicad add-on development using the C++ API.

Delete element problem


Hi there,

I use "ACAPI_Notify_CatchNewElement" to catch the modify of the element.


ACAPI_Notify_CatchNewElement(nullptr, ElementEventHandlerProc);


When I delete the wall element,I can get the "APINotifyElement_Delete" message.However, if I delete a wall which has intersaction with other element, I just can get the delete message but not a modify message which may occured on other elements.Here's the figure1 that I create two wall.and figure2 shows that i delete one of the wall but I can just catch the delete event,so the other wall remains a hole.


So is there some way that I can get the modify?




I tried it and I also couldn't get a modify message.
Another thing I tried was getting the Wall Relation on the deleted Wall Element. ( Unfortunately this doesn't seem to work either, since I think the API considers the Wall already deleted when entering Handler with the delete notification. (Also doesn't work for ACAPI_Notify_GetParentElement).

The only thing that keeps working for me during the APINotifyElement_Delete notification are Element Links:

So if you have a way to create such links for those touching walls, than you can also query the links during the delete event.


Hope this helps!

Bernd Schwarzenbacher - Archicad Add-On Developer - (Downloads & Articles)

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!