2024 Technology Preview Program:
Master powerful new features and shape the latest BIM-enabled innovations
2022-05-31 08:36 AM
Hi there,
I use "ACAPI_Notify_CatchNewElement" to catch the modify of the element.
ACAPI_Notify_CatchNewElement(nullptr, ElementEventHandlerProc);
ACAPI_Notify_InstallElementObserver(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?
2022-06-07 11:44 AM
Hi!
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. (https://archicadapi.Graphisoft.com/documentation/acapi_element_getrelations) 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: https://archicadapi.Graphisoft.com/documentation/acapi_element_getlinks
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!