- Sat Oct 12, 2019 9:56 am
The ARCHICAD API doesn't really define the concept of a 'building' apart from IFC. We've had to rely on geometric methods to discover the perimeter of a building within a project and then allocate elements to buildings on the basis of containment.
The API doesn't have a formal concept of a database either, at least not in the conventional sense. A database is loosely a collection of homogenous data structures, e.g. all attributes or all elements.
Most API calls don' reference a database – the ones that do are mostly found in the documentation for ACAPI_Database, e.g. APIDb_ChangeCurrentDatabaseID (which changes the active database). Once a database is 'set', other API calls act on that database, e.g. ACAPI_Element_Get to retrieve a specific element.
The element data structure is API_Element. You can determine which floor an element belongs to by inspecting its header, header.floorInd. The details of the floor can be retrieved using the method I described above with APIEnv_GetStorySettingsID.
Ralph Wessel BArch