BIM Coordinator Program (INT) April 22, 2024
Find the next step in your career as a Graphisoft Certified BIM Coordinator!
Archicad C++ API
About Archicad add-on development using the C++ API.

Saving User Data to an element

Anonymous
Not applicable
HI.
I have the ACAPI_Element_GetUserData/SetUserData functions working however I am unsure how to save the info so it can be retrieved after the Archicad file has been saved & closed. The user data is lost when Archicad project is opened again
1 REPLY 1
poco2013
Mentor
Can't help as you did not post any code. BUT on the off chance that you haven't already looked at this. you could compile the example "Notification_Manager" which gives a example of storing info to a element.

The example stores type, GUID, & time to the selected element(s). Just tested it and it works for me and does save the data upon exit of Archicad. The menu items are "Mark selected elements" for data storage and "List/Check owned elements' for data retrieval. You may want to look at the code which is in "Element_UserData.cpp" in the "Notification Manager" example.
Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27
Learn and get certified!