3 weeks ago
If I understand it correctly, the benefit of ACAPI_AddOnObject_* methods over ACAPI_ModulData_* is that you can a) perform changes inside an undo scope and b) sync the data to the server (and other people). But how can I react to this happening?
I'd like to know when there are changes to AddOnObjects due to undo/redo or sync with server, but I couldn't find any events handling this. What are the methods I need to use for this? e.g. ACAPI_Element_AttachObserver does not work, AddOnObjects are no real objects despite being addressed via GUID.
Operating system used: Windows
3 weeks ago - last edited 3 weeks ago
Hi,
Please check here: Archicad 29 C++ API: Add-On Objects
It states the requirements for the notifications to work. Please report it if it still doesn't work.
Best regards,
Tamás
3 weeks ago
The methods you mentioned do work, but they don't cover the scenario I'm interested in. The user performing undo/redo does not call the installed handlers, only load/save of an older archicad file format does so.
2 weeks ago
Hi,
Please clarify, is it with Undo/Redo that you don't get notifications. Do notifications for create and delete elements work?
Best regards,
Tamás
2 weeks ago
I want to get notified whenever the user performs undo/redo that includes an added/deleted/changed AddOnObject, and I can't find an API for that.
ACAPI_Element_AttachObserver does not work with GUIDs from AddOnObjects.
ACAPI_AddOnObject_RegisterAddOnObjectHandler/ACAPI_AddOnObject_InstallAddOnObject...Handler does not trigger for undo/redo.
a week ago
Hi,
I can only think of a workaround for this. Perhaps you should maintain a table in the addon that connects element guids to addOnObject guids.
On opening/joining a plan go through all the elements, build a table, then maintain it by notifications on create/delete/undo/redo.
Your addon should be resident for this, so it's not unloaded after use.
Regards,
Tamás