License delivery maintenance is planned for Saturday, July 26, between 12:00 and 20:00 CEST. During this time, you may experience outages or limited availability across our services, including BIMcloud SaaS, License Delivery, Graphisoft ID (for customer and company management), Graphisoft Store, and BIMx Web Viewer. More details…
4 weeks ago - last edited 2 weeks ago
Hi!
I'm developing an Archicad Add-On for client of mine and we are facing a Teamwork issue for a long time. Unfortunately the Developer Support wasn't yet able to help us and it's been a while since we got an answer. Originally it only occurred in AC27 but in the meantime also in AC26 & AC28.
The issues happen in Teamwork when updating (text-)files in the embedded library.
There seem to be two conflicting issues:
Here's some pseudocode of our current approach:
ReceiveChanges
ReloadLibraries
GetLockableStatus (ExistingLibItemRefGuid)
if (lockableExists) { ReserveLockable (ExistingLibItemRefGuid) }
DeleteEmbeddedLibItem // Seems necessary to properly update embedded lib items
CopyFileIntoLibrary // (with overwrite=true but probably not relevant bc. we delete it anyway)
// ERROR happens in this following line
ReleaseLockable (NewLibItemRefGuid)
ReloadLibraries
SendChanges
We've tested several orders of operations of deleting/overwriting/copying/receiving/releasing/reserving/sending but haven't yet found any error-free approach. Does anybody have any tip or hint what I might be missing?
@Viktor Kovacs @Tibor Lorantfy @Akos Somorjai maybe you have some special insights into this?
Thanks in advance!
Bernd
Solved! Go to Solution.
Wednesday
The solution is to register the .txt file as a macro library part (ACAPI_LibPart_Register) after copying it into the library and before releasing the library item. Then it's no longer necessary to delete the file beforehand. So far this approach solved all teamwork issues we had and didn't lead to any others.
I also dropped the reload library commands as they were no longer necessary.
Huge thanks to @Viktor Kovacs for the hint!
Wednesday
The solution is to register the .txt file as a macro library part (ACAPI_LibPart_Register) after copying it into the library and before releasing the library item. Then it's no longer necessary to delete the file beforehand. So far this approach solved all teamwork issues we had and didn't lead to any others.
I also dropped the reload library commands as they were no longer necessary.
Huge thanks to @Viktor Kovacs for the hint!