Teamwork Issues when Updating Files in the Embedded Library

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2025-06-24 03:36 PM - last edited 4 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:
- We have to delete embedded .txt-files before overwriting them. Otherwise the files are reset to their previous state after closing and reopening the project. This issue happens both for Non-Teamwork and Teamwork files. As a workaround we started to first delete the embedded .txt-file and then copy the updated file into the embedded library. This workaround works in both cases.
- Point 1 sometimes (not always) leads to Teamwork errors. ("Error in the last Teamwork Operation ....").
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.
- Labels:
-
Possible Bug
-
Question
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
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!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
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!