I am trying to get all elements (specifically wall) from a drawing element. This drawing element is a view of a floor plan. Here is my initial code:
// change database
BNZeroMemory(&dbInfo, sizeof(API_DatabaseInfo));
dbInfo.typeID = APIWind_DrawingID;
dbInfo.linkedElement = i_drawingGuid;
err = ACAPI_Database(APIDb_ChangeCurrentDatabaseID, &dbInfo);
// get all elements on this database
GS::Array<API_Guid> guids = {};
ACAPI_Element_GetElemList(i_elemType, &guids, APIFilt_InCroppedView);
Int32 cnt = guids.GetSize();
for (Int32 i = 0; i < cnt; ++i)
{
API_Element elem;
BNZeroMemory(&elem, API_ElementSize);
elem.header.guid = guids[i];
ACAPI_Element_Get(&elem);
DBGPrintlnf("%u ?= %u", i_elemType, elem.header.typeID);
}
ACAPI_Database returns APIERR_BADPARS. And I think it is the dbInfo.databaseUnId, since it is not set. What is the value that should be place here?
~ReignBough~
ARCHICAD 26 INT (from AC18)
Windows 11 Pro, AMD Ryzen 7, 3.20GHz, 32.0GB RAM, 64-bit OS