I an trying to get the current window title (Windows 10 -- Archicad 25) , current floor plan. Following the example i used ACAPI_Database(APIDb_GetCurrentWindowID,...) To retrieve windowInfo but the documentation states that the title info is not filled in windowInfo and that one must then use ACAPI_Database(APIDb_GetDatabaseInfoID, ...).
NOLUCK -- the title info is blank
API_WindowInfo windowInfo;
BNZeroMemory(&windowInfo, sizeof(API_WindowInfo));
//GS::Array<API_DatabaseUnId> dbases;
GS::GSErrCode err = ACAPI_Database(APIDb_GetCurrentWindowID, &windowInfo, nullptr);
if (err)
{
ACAPI_WriteReport(" Error - %s", true, ErrID_To_Name(err));
}
else {
API_DatabaseInfo dbPars = {};
dbPars.databaseUnId = windowInfo.databaseUnId;
ACAPI_Database(APIDb_GetDatabaseInfoID, &dbPars, nullptr);
char msg[1024];
sprintf(msg, " success index - %d name - %s", dbPars.index, dbPars.name);
ACAPI_WriteReport("Title %s", true, msg);
}
Thanks