We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2010-12-01 02:42 AM - last edited on 2023-08-03 10:38 AM by Doreena Deng
2010-12-01 04:44 AM
2010-12-01 07:50 AM
void RefreshAllLayoutBooks() { API_DatabaseUnId *dbases = NULL; API_DatabaseInfo db_orig, dbLayoutBook; OSErr err; Int32 nDbases = 0; if(ACAPI_Database(APIDb_GetCurrentDatabaseID, &db_orig, NULL) != noErr) return; if(ACAPI_database(APIDb_GetLayoutDatabasesID, &dbases, NULL) == noErr) { nDbases = BMpGetSize(reinterpret_cast<GSPtr>(dbases))/sizeof(API_DatabaseUnId); for(Int32 ii = 0; ii < Dbases; ++ii) { BnZeroMemory(&dbLayoutBook, sizeof(API_DatabaseInfo)); dbLayoutBook.typeID = APIWind_LayoutID; dbLayoutBook.databaseUnId = dbases[ii]; if(ACAPI_Database(APIDb_ChangeCurrentDatabaseID, &dbLayoutBook, NULL) == noErr) ACAPI_Database(APIDb_RebuildCurrentDatabaseID); } } ACAP_Database(APIDb_ChangeCurrentDatabaseID, &db_Orig, NULL); if(dbases != NULL) BMpFree(reinterpret_cast<GSPtr>(dbases)); }Is this code right?
2019-11-10 09:02 PM
Link wrote:Where can I find it?
Ralph Wessel's Codebook add-on does that.
Cheers,
Link.