Archicad C++ API
About Archicad add-on development using the C++ API.

Reserve Library

Anonymous
Not applicable
Hi,

I'm trying to work out how to reserve the library in Teamwork mode via the API in the same way you can using the normal Reserve button in the Library Manager Dialog. None of the strings in the ACAPI_TeamworkControl_FindLockableObjectSet documentation seem appropriate. is it possible to reserve this via the API?
5 REPLIES 5
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
Hi Brendan,

At first could you clarify please what you want to reserve exactly?
  • In the Library Manager you can reserve "the list of libraries" at the "Libraries in Project" tab. After you reserved this, you will be able to add new libraries to the project or unload any library.
  • At the "Embedded Library" tab you can reserve the complete Embedded Library or any subfolder or any item separatly inside the Embedded Library.
The first one is currently not possible via API, I can add it as a feature request.
The second one is possible via API by using the ACAPI_TeamworkControl_ReserveLockable function after getting the necessary GUIDs from ACAPI_Environment (APIEnv_GetLibPartRefGuidID, ...). You can find an example for this in Teamwork_Control example Add-On, search the ReserveOrRelease_EmbeddedLibraryFolder function.

Regards,
Tibor
Anonymous
Not applicable
Hi Tibor,

Can't believe I missed that in the Teamwork_Control example! The folder reservation is exactly what we need.

The first item you mentioned is what we were actually trying first, we have an LCF that we want to import into a project. But as this doesn't even seem to be possible via the GUI in Teamwork so we're extracting the LCF and importing the gdls inside it manually. We can do this since we have complete control over the creation of the LCFs so know what will be in them.

Will let you know how it goes.

regards

Brendan
Anonymous
Not applicable
Hi Tibor,

I'd like to make the feature request for #1 thanks. In my 'Programatically loading GDL not importing surfaces' thread we've found the only way we get our script to execute is via a pair of APIEnv_GetLibrariesID/APIEnv_SetLibrariesID calls which fails in teamwork since we can't programatically reserve the library. Unless there's another way to force our GDL script to run we'll need this to be able to have our import plugin work without manual user intervention.

regards

Brendan
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
Dear Brendan,

I added this to our database as a feature request (GISS-74 Reserve the list of libraries via API).
I will notify you if there is any news about this.
Which version of ARCHICAD do you use?

Regards,
Tibor
Anonymous
Not applicable
Hi Tibor,

Well we currently have to support Archicad 18 to 23 however wouldn't expect any API changes in versions earlier than 23.

regards

Brendan