‎2023-12-13 09:08 PM - last edited on ‎2024-09-16 02:57 PM by Doreena Deng
Maybe thats a dumb question:
we can get a notification when a element gets deleted that has the ElementObserver installet to it with the API Call "ACAPI_Element_InstallElementObserver"
the documentation and the Notification_Manager example imply that it is only possible to be notified when a element gets deleted when the observer is attached to a element.
is there really no other way to get notified when a element gets deleted?
Solved! Go to Solution.
‎2023-12-18 06:00 PM
Hi Joel!
You could install the necessary element observers by iterating through all elements you want to be notified for when opening the project. Make sure to handle the case when an observer is already installed for an element.
Or is there something blocking you from doing this?
Best,
Bernd
‎2023-12-14 04:08 PM
Check out the Notification_manager example add-on. You can handle all types of notifications.
‎2023-12-14 10:38 PM
are you sure the example is able to get a notification of a deleted element that has been created before the ACAPI_Element_CatchNewElement Callback has been hooked?
both walls get deleted
Only one deletion can be seen in the Element Manager:
From my understanding it is not possible to get any changes of elements that have been created bevore element callback methods have been setup. from my point of view defeats this functionallty the purpose of a element callback system. furthermore would this mean that the element callback system is not consistent to other callback systems like the Project Operation- or the Selection Callbacks, they can catch any changes made to the database.
‎2023-12-18 06:00 PM
Hi Joel!
You could install the necessary element observers by iterating through all elements you want to be notified for when opening the project. Make sure to handle the case when an observer is already installed for an element.
Or is there something blocking you from doing this?
Best,
Bernd
‎2023-12-20 07:35 AM
Hehey Bernd
Thank you for your answer. thats waht i thought that i have to do but i was not sure if i missed something. now i know for sure 😄
the problem i have is, that a iteration trough the database is time consuming and freezeses the gui 😞
‎2023-12-20 08:54 AM
Yeah that's the unfortunate side effect 😣
In case you haven't used it before, there's a way to show a progress window which at least lets the user know how long it'll take. There's some sample code for it in the DG_Test example.