Defines custom preferences data to be saved into older project file versions.
GSErrCode ACAPI_SetPreferences_OldVersion ( Int32 version, GSSize nByte, const void* data, unsigned short platformSign, API_FTypeID oldPlanFileID );
- [in] The version of the data to be stored.
- [in] The size of the data to be stored.
- [in] The preferences data you would like to store for the specified plan version.
- [in] The platform identifier of the data (
- [in] The plan file format associated with the preferences data when saving the project into this plan version. The value of this parameter can be:
For common API errors see the API Errors document.
This function is used to save your own options or preferences into the preferences file of the server application or into the project file to be saved. This information can be later retrieved with ACAPI_GetPreferences and ACAPI_GetPreferences_Platform.
You can define different preferences to be saved into different plan file formats. Use this function if your add-on had incompatible preferences format in the previous versions of ARCHICAD. Store the data in that format too indicating which plan version should use it. When the user chooses to save the plan into an older plan format, the appropriate preferences data will be stored.
For more details see the Saving Add-On data into the Preferences and the Project File section.
const Int32 ActVersion = 3; const Int32 Version_in_AC8 = 2; const Int32 Version_in_AC7 = 1; struct MyPrefs prefsData; struct MyPrefs_in_AC8 dataForAC8; struct MyPrefs_in_AC7 dataForAC7; // construct the preferences data... // store the actual preferences ACAPI_SetPreferences (ActVersion, sizeof (MyPrefs), &prefsData); // specify preferences to be saved into older plan file versions ACAPI_SetPreferences_OldVersion (Version_in_AC8, sizeof (MyPrefs_in_AC8), &dataForAC8, GS::Act_Platform_Sign, APIFType_PlanFile800); ACAPI_SetPreferences_OldVersion (Version_in_AC7, sizeof (MyPrefs_in_AC7), &dataForAC7, GS::Act_Platform_Sign, APIFType_PlanFile700);
- Version: API 6.1 or later
- Header: ACAPinc.h