SCENE C++ API  2.1.0
Standalone App Developer Guide

Getting Started on Windows

This article illustrates how you can set up your development environment in order to be able to develop standalone apps for the SCENE platform. Starting with the setup requires the following:

  • A 2.0.x version of the SCENE API Standalone Developer Package
  • A Microsoft Visual C++ IDE (free 'Express' editions can also be used for the development)

Installing the Developer Package

Run the installer of the developer package and follow the on-screen installation instructions. In the installation directory of the developer package you will find additional documentation, samples and resources to get started with the app development.

Directory Structure of the Developer Package

The installation directory of the developer package contains the following sub-directories:

  • doc/: Contains a snapshot of the web-documentation for the corresponding API version.
  • bin/: Contains binary redistributables which you need to deploy and install together with your standalone application.
  • c++/: Contains the SCENE API files relevant for the development of C++ standalone apps.
    • c++/samples/: Contains short app samples which illustrate certain aspects of the SCENE API.
    • c++/include/: Contains the header files which you need to include in your source files to make use of the C++ interface.
    • c++/lib/: Contains the library files which you need to include in your app project to be able to link against the SCENE API binaries.

Setting up a Standalone App Project

The SCENE API provides a C++ interface which can be accessed by standalone apps to make use of the API functionality.

  1. Start by setting up a new project in your Microsoft Visual C++ IDE. For a quick start you can just use the Empty Project template which should be provided by the project wizard of the IDE.
  2. Right-click on your project in the Solution Explorer pane and select Properties from the resulting pop-up menu.
  3. In Configuration Properties > C/C++ > General, add the path to the SCENE API include directory to the Additional Include Directories, e.g. C:\SCENE API\SCENE API Standalone Developer Package 2.0.0 x64\c++\include
  4. In Configuration Properties > Linker > General, add the path to the SCENE API library directory to the Additional Library Dependencies, e.g. C:\SCENE API\SCENE API App Developer Package 2.0.0 x64\c++\lib\x64
  5. In Configuration Properties > Linker > Input, add the SCENE API libraries Core_API.lib, Scanner_API.lib and Standalone_API.lib to the Additional Dependencies.
  6. In Configuration Properties > C/C++ > Manifest File, add an entry for the SCENE API redistributable to the Additional Manifest Dependencies, e.g.

    type='win32' name='FARO.SCENE.Redistributable' version='' processorArchitecture='amd64' publicKeyToken='1d23f5635ba800ab'

Note: In order to be able to use the SCENE API, your project has to be configured to target 64bit platforms. More Information on how to setup your project for 64bit platforms can be found at the following link: How to: Configure Visual C++ Projects to Target 64-Bit Platforms.

Using the SCENE API in Your Application

Before accessing any of the API interfaces, you should make sure that an application context for your application exists. The application context initializes essential data structures used by other API interfaces and also cleans up those data structures once it is deleted. Therefore, you should also make sure that the created application context is always the last API object to be destroyed in your application. Standalone apps can simply create an application context by creating an instance of the LSStandaloneContext class:

#include <standalone_api/lsstandalonecontext.h>

using namespace SCENE_API

int main(int argc, char *argv[])
        // Standalone Apps always need to make sure to instantiate a standalone
        // context before using any other API functionality. This context has to
        // exist at least as along as any other API object!
        LSStandaloneContext context;

        return 0;

Deploying the SCENE API with Your Application

When you are using the SCENE API in your application, you need to make sure that it is properly deployed and installed together with your software. Generally, you can find all the required dependencies you need to include and install with your software in the bin/ directory within the installation directory of the SCENE API Standalone Developer Package. The dependencies required to use the SCENE API include:

  1. SCENE Redistributable Package 2.x.y.z x64.msi - The SCENE API Standalone Package. You can silently install this package with your software using the following command line:
    msiexec.exe /quiet /I "SCENE Redistributable Package 2.x.y.z x64.msi
  2. vcredist_x64_2019.exe - The Microsoft Visual C++ Redistributable Package. You can silently install this package with your software using the following command line:
    vcredist_x64_2019.exe /install /quiet /norestart