cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Developer forum
GDL coding questions, Python and add-on development using the API Dev Kit.

Reloading BIM Server Libraries

Danny Sparks-Cousins
Participant
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));

	}
Cheers,
Danny
0 REPLIES 0

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!