2026-04-24 03:45 PM
Hello All
I have a bit of a tricky one here.
I have created an add-on that creates a dynamicimage that my library parts UI loads.
So depending on the shape of the object, the image will change and reflect this shape.
It works really really well.
The problem is where to keep the image.
Any suggestions would be greatly appreciated. 🙏
3 weeks ago
Hi Ben,
I've created a support ticket from your question, I'll ask a couple of my colleagues to mull over the problem, and try to come up with ideas.
Regards,
Tamás
2 weeks ago
Thanks Tamás.. appreciate it
2 weeks ago - last edited 2 weeks ago
Why is writing it to pln as custom data stupid?
I use in-memory sqlite that gets saved on demand into project data.
Monday - last edited Monday
Hi Ben,
The developers came up with a couple of ideas:
A suggestion is that you should use the temporary folder: generate your images in a subfolder, add it temporarily as a library, and remove it on exit. In this case, the generated images will be lost (or maybe reused if that folder is used again and was not deleted between ArchiCAD sessions), but I suppose you do not need to keep them.
API_SpecFolderID specID = API_TemporaryFolderID;
IO::Location tempFolder;
ACAPI_ProjectSettings_GetSpecFolder (&specID, &tempFolder);
A second idea would be the image section of your library parts.
RESULT_IF (selectedObject->GetGDLPictures ())
{
modifier.SetGDLPictures (*result);
}
This is a special section in a library part; image(s) stored in it can be referenced by indices, and we typically use these to store small icons for the interface script (not dynamically so far). For syntax, see the picture_reference parameter of the UI_ commands. This would also require your library parts to be editable, but you can make sure they are if you copy them to the temporary folder already mentioned and use them from there (this is quite complicated because you have to unload the original first and add the temporary one). We use this method for custom component collections, where we need to add new lines to the scripts each time a new custom component is created.
Hope this helps!
Regards,
Tamás