We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2024-09-16 12:10 PM
Hi all,
A quick question from me: is it possible at all to request an element or lockable object set (something like the Location Settings) from another user using the API? Checking through the documentation and searching online there doesn't seem to be any mention of it, though I might've missed something. I can see there's a function for requesting AddOn objects, but it's limited to just those unfortunately.
Thanks,
Rob
2024-09-18 04:17 PM
Do you mean making reservations of elements, e.g. ACAPI_Teamwork_ReserveElements?
2024-09-19 10:51 AM
Essentially I'm looking for something similar to ACAPI_AddOnObject_RequestObjects() but for lockable object sets. Currently I'm using ACAPI_Teamwork_ReserveLockable to reserve the Location Settings, but if another user already owns that it just throws APIERR_SERVICEFAILED when I try to reserve it. I've seen that ACAPI_Teamwork_ReserveElements brings up a conflict dialogue for requesting elements, but this doesn't seem to be the case for lockable object sets.
2024-09-19 05:46 PM
I haven't tested this myself, but would the example project 'AddOnObject_Manager_ReserveInterface' do what you want? It seems to be leveraging the call 'ACAPI_RegisterTeamworkReserveInterface' to create an interface for reserving objects.