We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2024-03-11 07:22 AM - last edited on 2024-09-17 01:12 PM by Doreena Deng
"Hello, I decided to ask 3 questions in one topic.
Advise on which libraries are best to use for the following functions in Archicad add-ons:
Solved! Go to Solution.
2024-03-13 02:30 PM - edited 2024-03-13 02:36 PM
hehey UFO, i hope some other developers post how they see your questions. i see it this way:
1. The Archicad SDK comes with the libxl library. no need to feed your own library as resource to the add-on. just include the header and your good to go. you can use the documentation from them and start hacking. very cool. even a few of the add-on examples use the library.
2. ACAPI_Set/GetPreferences is my guy
A very cool and convenient way to store global data. i cant answer for you how well protected the preferences file is, if you want to store login data or something like this. (the api even comes with encryption libs, too!) forget the usage of this api like they show in the examples. unless you want to deep dive c. use it like its shown in the archicad maze tutorial. since you can feed wahtever you want to the api, you of course can save XML or JSON data. if you dont do some sort of Web API calls where you work with the XML/JSON data, i wouldnt even bother to do serialization and deserialization to XML. just save your object to the preferences. you even can save nested objects.
https://graphisoft.github.io/archicad-api-devkit/group___preferences.html
https://archicadapi.graphisoft.com/archicad-maze-generator-add-on-tutorial-part-3
3. cant answer that one.
2024-03-13 02:30 PM - edited 2024-03-13 02:36 PM
hehey UFO, i hope some other developers post how they see your questions. i see it this way:
1. The Archicad SDK comes with the libxl library. no need to feed your own library as resource to the add-on. just include the header and your good to go. you can use the documentation from them and start hacking. very cool. even a few of the add-on examples use the library.
2. ACAPI_Set/GetPreferences is my guy
A very cool and convenient way to store global data. i cant answer for you how well protected the preferences file is, if you want to store login data or something like this. (the api even comes with encryption libs, too!) forget the usage of this api like they show in the examples. unless you want to deep dive c. use it like its shown in the archicad maze tutorial. since you can feed wahtever you want to the api, you of course can save XML or JSON data. if you dont do some sort of Web API calls where you work with the XML/JSON data, i wouldnt even bother to do serialization and deserialization to XML. just save your object to the preferences. you even can save nested objects.
https://graphisoft.github.io/archicad-api-devkit/group___preferences.html
https://archicadapi.graphisoft.com/archicad-maze-generator-add-on-tutorial-part-3
3. cant answer that one.
2024-03-15 12:15 PM
Thank you for the response.
1. Yes, that's exactly what I needed (just didn't see it in the documentation, so I didn't think to look in the provided libraries).
2. The path to saving data in Archicad files will work for me, but creating modal dialogs is too cumbersome, so I'm looking for a way to create a simple configuration that the user could customize. I'm thinking in the direction of an XML file. Your answer also helped me here; it turns out there are examples of working with XML in the samples (although there is no documentation, you can figure it out), and the GS library for working with XML also exists.
3. Let's wait, maybe someone will share their experience. Any suggestions are welcome, in any case, doing something is better than doing nothing.