We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2019-10-11 08:27 AM - last edited on 2022-09-29 10:08 AM by Daniel Kassai
Solved! Go to Solution.
2019-10-11 10:56 AM
API_StoryInfo storyInfo; BNZeroMemory(& storyInfo, sizeof (API_StoryInfo)); GSErrCode err = ACAPI_Environment(APIEnv_GetStorySettingsID, &storyInfo, nullptr); //…get whatever you need from the story data BMKillHandle((GSHandle *) &storyInfo.data);The
2019-10-11 10:19 AM
2019-10-11 10:25 AM
Ralph wrote:yes. .How can I get the Information? thank you
Sorry, I'm not clear on the question. Do you want the building storey information, e.g. the name, base level and height of each floor in the building?
2019-10-11 10:56 AM
API_StoryInfo storyInfo; BNZeroMemory(& storyInfo, sizeof (API_StoryInfo)); GSErrCode err = ACAPI_Environment(APIEnv_GetStorySettingsID, &storyInfo, nullptr); //…get whatever you need from the story data BMKillHandle((GSHandle *) &storyInfo.data);The
2019-10-11 01:14 PM
2019-10-11 02:25 PM
2019-10-12 02:45 AM
Ralph wrote:except IFC,is there the "Building" concept in Archicad?
When you say "Building", do you mean as defined by IFC?
2019-10-12 10:56 AM
2019-10-14 05:04 AM
Ralph wrote:Thank you very much. I understand it.
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 forACAPI_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_Getto 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.