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

Reloading BIM Server Libraries

Danny Sparks-Cousins
Hi All,

Having trouble reloading BIM server libraries when using the sample code from the developer docs. It reloads the libraries, but instead of reloading the BIM libraries, it drops them and loads them as linked libraries at C:\Users\username\Graphisoft\TW Data\L-2\LIBC\LIBR etc.

Is there a way to get the API to reload BIM Server libraries? The 'Reload Libraries' menu introduced into ArchiCAD in v15 seems to work properly - I assume there is an API method?
	API_LibrariesInfo	libInfo;
	GSErrCode			err;

	BNZeroMemory (&libInfo, sizeof (API_LibrariesInfo));

	if (ACAPI_Environment (APIEnv_GetLibrariesID, &libInfo, NULL) == NoError) {

		err = ACAPI_Automate (APIDo_LoadLibrariesID, &libInfo, NULL);
		if (err != NoError) {
			char msgStr[256];
			sprintf (msgStr, "Error in APIDo_LoadLibrariesID: %d", (int) err);
			ACAPI_WriteReport (msgStr, true);

		for (Int32 ii = 0; ii < libInfo.nLib; ii++) {
			(*libInfo.locations)[ii].~Location ();
		BMKillHandle (reinterpret_cast<GSHandle *> (&libInfo.locations));


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!