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.


Copyright © 2020 · All Rights Reserved · Wysilab