Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Evoke includes an extensive Application Programming Interface (API) for remote control, system monitoring and third-party application integration.

The API has two parts:

Table of ContentsmaxLevel1exclude

Scroll only
scroll-viewporttrue
scroll-pdftrue
scroll-officetrue
scroll-chmtrue
scroll-htmltrue
scroll-docbooktrue
scroll-eclipsehelptrue
scroll-epubtrue
1(Headless|Connect|Example).*

For information on running entirely via the API, without the Graphical User Interface (GUI), see Headless operation.

Vicon Core API

The Vicon Core API provides the core functionality for client/server communication, and schemas that define the types, functions and callbacks supported by the Vicon application. It is a generic JSON-based protocol operating over TCP.

...

This trace shows two commands sent to the server as JSON-encoded strings, in the format format [SchemaName,CommandId] [Data]:

...

Evoke API is compatible with Python 2.7 and Python 3.7 and later.  

Scroll pagebreak

The following services are currently provided:

...

Instructions for use and full documentation are included in the packages. A limited dashboard application is provided for C#, together with a number of sample Python scripts.  

Scroll pagebreak

Install the Evoke API

...

These procedures guide you through the installation process:

Check Python version

Anchor
CheckPython
CheckPython

...

If you are not sure if you have Python installed or which version of Python you are using, you can open a command prompt and run the py command. For example:

...


If you do not have Python installed, see Install Python.  

Scroll pagebreak

Install Python

Anchor
InstallPython
InstallPython

...

To install Python 2 or 3:

  1. Go to   https://www.python.org/downloads/
  2. Locate the required version and install Python, ensuring that Add python.exe to PATH is selected:

    In the above image, ABC is replaced with your username for the installation folder.  

    Scroll pagebreak

Install the Evoke Python module

Anchor
InstallTrackerModule
InstallTrackerModule

...

To install the Evoke Python module:

  1. Locate the installation files. If you installed Evoke in the default location, they are found in this folder:

    C:\Program Files\Vicon\Evoke1.#\SDK\Python

    These folders and files are displayed:

    • evoke_api

    • sample_scripts
    • vicon_core_api
    • install_evoke_api.bat
    • readme.txt
    • uninstall_evoke_api.bat
  2. Install the Evoke Python module in either of the following ways, depending on your particular installation:
    • The simplest way is to run the batch file (install_evoke_api.bat) that is included in the Evoke installation (as shown in the previous image). This usually works well if:

      • Python was installed to the PATH variable; or

      • Multiple versions of Python are installed, but you want to install the API to the latest version that you installed; or

      • Only a single version of Python is installed.

      If any of these conditions apply, see Install the python module by running the batch file.

    • In all other cases, install the Python module by using pip. This usually applies if:

      • Multiple versions of Python are installed, but you want to install to a specific version; or

      • Multiple different versions of Python are installed and you want to install to all of them (in this case, you must install the module for each version); or

      • Only a single version of Python is installed, but you didn't install to PATH.

      If any of these conditions apply, see Install the Python module by running pip.  

...

...

Install the Python module by running the batch file

Anchor
BatchFile
BatchFile

To do this:

  1. Navigate to the Python install folder:

    C:\Program Files\Vicon\Evoke1.#\SDK\Python

  2. Double-click install_evoke_api.bat.

    The installation process initializes automatically.

...

Install the Python module by running pip

Anchor
InstallPIP
InstallPIP
  1. Navigate to the Scripts folder for the Python that you want to use:

    • For Python 3, the default installation folder is:
      C:\Users\<username>\AppData\Local\Programs\Python\Python<version>\Scripts

    • For Python 2.7, the default installation folder  folder is:
      C:\Python27\Scripts

  2. Open a command window or powershell in that folder.
  3. Run the following command to install the Vicon Core API:

    Scroll only

    C:\Users\<username>\AppData\Local\Programs\Python\Python311\Scripts> .\pip.exe install "C:\Program Files\Vicon\Evoke 1.6\SDK\Python\vicon_core_api"

    Scroll ignore
    text
  4. Run the following command to install the Evoke API:

    Scroll only

    C:\Users\<username>\AppData\Local\Programs\Python\Python311\Scripts> .\pip.exe install "C:\Program Files\Vicon\Evoke 1.6\SDK\Python\evoke_api"

    Scroll ignore
    text
Info

Note
The above examples use a Python 3.11 installation with Evoke 1.6. Your path and commands may differ slightly.

...

Check that the Python module installed correctly

Anchor
CheckPythonModule
CheckPythonModule

Check that the following modules have been installed:

...

  • Check the site-packages folder in the Python installation for the evoke_api or  orvicon_core_api folder. For Python 3.11, the location of the default installation folder is:
    C:\Users\<username>\AppData\Local\Programs\Python\Python311\Lib\site-packages
  • Check your system environment variables and ensure that the scripts folder for the Python installation you want to use is the highest in the list. For Python 3.11, the default location of the installation folder is:
    C:\Users\<username>\AppData\Local\Programs\Python\Python311\Scripts

If either of the modules folders is missing, and you have verified the path, re-run through the installation process described in Installing the evoke Python module.

Connect to the terminal server

...

When you have successfully connected, you can access the services provided by the Evoke terminal server.  

Scroll pagebreak

This example uses basic object services:

...

From here you can run the example script of your choice.  

Scroll pagebreak

The following examples use the command window.

...

The Capture name is listed before the controls. To change the capture name, use capture_services and SetCaptureName.  

For questions on using the Evoke API, contact Vicon Support.

Headless operation

Anchor
Headless
Headless

...

Evoke may be operated entirely via API, in which case it may be advantageous to run without the Graphical User Interface (GUI). A separate executable is provided for this purpose:

...

For more information, see Evoke Headless in the Vicon Evoke Reference Guide.