...
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 Contents
Scroll only | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||
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
- Installing Python
- Installing the Evoke Python module
- Check that the Python module installed correctly
Scroll pagebreak
Check Python version
Anchor | ||||
---|---|---|---|---|
|
...
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 | ||||
---|---|---|---|---|
|
...
To install Python 2 or 3:
- Go to https://www.python.org/downloads/
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 | ||||
---|---|---|---|---|
|
...
To install the Evoke Python module:
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
- 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 | ||||
---|---|---|---|---|
|
To do this:
Navigate to the Python install folder:
C:\Program Files\Vicon\Evoke1.#\SDK\Python
Double-click install_evoke_api.bat.
The installation process initializes automatically.
...
Install the Python module by running pip
Anchor | ||||
---|---|---|---|---|
|
- 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
- For Python 3, the default installation folder is:
- Open a command window or powershell in that folder.
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 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 |
...
Check that the Python module installed correctly
Anchor | ||||
---|---|---|---|---|
|
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 | ||||
---|---|---|---|---|
|
...
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.