[Contents] [Intro] [Reference] [Tutorial] [Questions [New [Index]
Overview -> Reference -> API Reference -> Programmers Guide

daVinci API - Programmers Guide

This document is an overview of the API for programmers who want to connect their application with daVinci.

Commands of the API

After connecting your application program with daVinci (section "How to connect an Application" explains this topic in detail), you can start sending commands to the API. The "Overview of Commands" is a useful reference to browse the command syntax. The commands are divided into ten categories with respect to their semantic. They are build hierarchically with parenthesis according to the category they belong to, e.g. command menu(file(exit)). The following categories are available:

Answers from the API

All commands sent to the API are confirmed after execution by returning an answer which is usually ok, but communication_error(...) when the command failed. Some commands (listed here) return another confirmation answer instead of ok. It is very important to wait for confirmation before sending the next command, because in rare situations, the API accepts new commands even if the previous command is still in process and not yet confirmed, so the confirmation answers may not appear in the right order.

The rest of the answers (listed here) are events that are triggered by the user (e.g. to inform the application about selection of a graph node). Events can occur at any time, except when an API command is currently executed and not yet confirmed.

VERY IMPORTANT: Due to the strange effects of asynchronous communication, an event must also be expected by the application after sending a command to the API and before receiving the corresponding confirmation answer! daVinci guarantees that events are not propagated during execution of an API command, but if the event occured during transfer time of the command (i.e. after it is sent by the application and before it is received by the API), then the event answer may interfere and will arive at the application side in the time interval after sending the command and before receiving the corresponding confirmation answer. So never expect that the confirmation answer will come back directly after sending an API command. Your application should accept events at any time! Your application is responsible for handling an event answer. The event may trigger an operation in the application or can simply be ignored.

Important Notes about the API

Here are some important points that have to be considered when using the daVinci API:


daVinci V2.1 Online Documentation - Page update: June 15, 1998