Examples

In the subfolder named Examples you can find several example projects. They demonstrate the different services of the API thematically. Please study the example projects for better understanding of the logic of the whole API.

Structure

For each example the example’s main directory contains a project file for Xcode / Microsoft Visual Studio C++. After opening the project, you’ll be able to build any of the examples. These project files also serve as template files for creating your own projects, although the DevKit also contains real template projects for each compiler/platform.

The example folders are organized to hold:

  • source files (in the Src folder)
  • resource files (localizable in the RINT and non-localizable in the RFIX directory, and the platform-dependent part in the RFIX.win/ RFIX.mac folder)
  • project files for each platform

Compilation issues

Please remove the DEBUVERS directive from your projects, because causes conflicts between the release and debug versions of the InputOutput module. To be more specific, the Location class (see Location.hpp) contains a data member which is in #if defined(DEBUVERS). If your add-on is a debug version, and ARCHICAD is release version, then the size of the Location class will be different, and that may cause crashes whenever a location is transferred between ARCHICAD and your add-on (e.g. you add a library to the list of loaded libraries).


The examples give you hints, tips & tricks, and useful code snippets which demonstrate the correct use of different API managers and functions.

Areas: