Graphisoft®

API Development KitVersion: 15

Database Overview


The API enables you to work on the ArchiCAD database. Various functions are present to create, get, modify and also delete elements, attributes and library parts. It is also possible to control the selection of elements, and some settings of the overall environment; for example stories, grid settings, etc.

In this section, some information is provided about how the Virtual Building database is built up, and what the links are among the different components.


Elements

Database items named elements directly appear in one of the project windows. Their parameters can be set in the Settings Dialogs or in the Info Box. Most of them refer to many attributes, some of them to library parts.

API functions operating on elements begin with the ACAPI_Element_ prefix. Refer to the Element Manager to see the whole collection of functions that support element manipulations.

API structures referenced by the handler functions are explained in details in the Element Database document. Refer to this document to get specific information about the data structures related to all element types.

To read general information about elements refer to the Element Overview paper.


Attributes

Database items named attributes are global collections of layers, pen colors, surface materials, fill patterns, etc. that are available to all eligible tools. These attribute sets are editable, and the lists and palettes in the Tool Settings dialog boxes display their current settings.

API functions operating on attributes begin with the ACAPI_Attribute_ prefix. Refer to the Attribute Manager to see the whole collection of functions that support attribute manipulations.

API structures referenced by the handler functions are explained in details in the Attribute Database document. Refer to these papers to get specific information about the data structures related to all attribute types.

To read general information about attributes refer to the Attribute Overview paper.

The API also provides a platform-independent way to use those custom controls in ArchiCAD which provide the user a list of certain attributes he can choose from. You can read more on this in the FAQ.


Library Parts

Database items named Library Parts are prefabricated elements which may have instances in the project with different parameters like scaling, rotation, etc. Many elements have a reference to a specific Library Part, like windows, objects, rooms, etc. Library Parts can be created and edited through the Library Part editor dialog. The active library folders can be controlled through the Library Manager... dialog of ArchiCAD. From v4.1, you may receive notification when the loaded libraries change.

API functions operating on a Library Part file begin with the ACAPI_LibPart_ prefix. Refer to the Library Part Manager to see the available collection of functions to manage a Library Part file. API functions which control the active library folders can be accessed through the ACAPI_Environment function.

API structures referenced by the handler functions are explained in details in the Library Part Database document. Refer to these papers to get specific information about the data structures related to a Library Part file.

To read general information about library parts refer to the LibPart Overview paper.


Environment

There are database items which do not fit into any categories listed above, but have influence on the project's appearance and to the behavior of elements; such as the preferences like parameters, the drawing scale, the 3D projection parameters and so on.

API functions operating on the exported items of such data can be accessed through the ACAPI_Environment function.