cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Archicad C++ API
About Archicad add-on development using the C++ API.

Current Window Title

poco2013
Mentor
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
Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27
0 REPLIES 0

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!