We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Archicad C++ API
About Archicad add-on development using the C++ API.

Saving preferences to project

Miha Nahtigal
Advocate

Hi everyone. I have another question about API saving preferences into projects (different preferences/settings for each separate project).

 

The documentation states that preferences can be stored into a project. There is also mention of storing project preferences on forum. Despite all written documentation, when trying to save preferences into project, they get saved globally (same preferences for everytime, for every project). There is no mention in documentation how to determine saving target (globally or into project). Can this be achived with ACAPI_​SetPreferences or should I use ACAPI_AddOnObject*?

 

Regards, Miha

 

 

BIMquants.comBETA - Quantities and Costs Estimation in Archicad - BETA testers needed.
3 REPLIES 3
kovacsv
Booster

According to the documentation preferences are stored globally, and in the project, too: “The preferences data is also stored in all project files.” So in theory if an addon saves things in preferences, and the user saves the project, it should work fine.

If I store preferences in project 1, than open project 2, modify and store preferences, close project 2 and open project 1, the preferences remaind as saved from project 2. I would like to store per-project preferences, if it is possible. 

BIMquants.comBETA - Quantities and Costs Estimation in Archicad - BETA testers needed.

Are you sure you saved project 1 before closing it?

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!