First steps in Instant Terra C# API

Check if the API has been setup successfully.

To do so, we will create a C# project to start and stop the API.

Create a new C# project in Visual Studio

../../_images/create_project_menu.jpg ../../_images/create_project_window.jpg

Warning

The library InstantTerraApi.dll is compiled to work on x64 plateform. Your project should be compiled for x64 plateform too. If your project is in “Any CPU” mode, you have to uncheck the box “Prefer 32-bit” in the “Project parameters” > Build.

Add the API reference

../../_images/add_ref_menu.jpg ../../_images/add_ref_window_1.jpg ../../_images/select_dll.jpg ../../_images/add_ref_window_2.jpg ../../_images/solution_ref.jpg

Testing the API

Note

This section is for the sole purpose of checking whether the API works. If you want more information about how the API works, refer to the section Creating an instance of InstantTerra C# API.

using InstantTerraApi;

namespace TestingApi
{
    //*****************************************************************************
    //*****************************************************************************
    class Program
    {
        //*****************************************************************************
        //*****************************************************************************
        static void Main()
        {
            // Create an instance of InstantTerra
            InstantTerra instantTerra = new InstantTerra();

            // Close InstantTerra
            instantTerra.Close();
        }
    }
}

If InstantTerra starts, the API is working.