2026-02-16 03:32 PM
Hello. Have somebody coded a method or function that gets executed every time an element or elements get deleted from Archicad project?
For example I know there exists function: ACAPI_Element_CatchNewElement and ACAPI_Notify_CatchNewElement that accept function pointer to function that will be executed every time an element is created.
Is there an opposite of that?
I'd be glad for the responses. Thank you in advance!
Solved! Go to Solution.
2026-02-17 11:19 AM
ACAPI_Element_InstallElementObserver should suit your purposes. The type of action you want to observe is APINotifyElement_Delete. The API and documentation provide examples using this function. The only limitation is that you need to explicitly request a notification for a given element with ACAPI_Element_AttachObserver, i.e. the API won't notify you when an element is deleted if you haven't asked for it.
2026-02-17 11:19 AM
ACAPI_Element_InstallElementObserver should suit your purposes. The type of action you want to observe is APINotifyElement_Delete. The API and documentation provide examples using this function. The only limitation is that you need to explicitly request a notification for a given element with ACAPI_Element_AttachObserver, i.e. the API won't notify you when an element is deleted if you haven't asked for it.