Introduction

The Python API (application programming interface) was introduced in VE 2017. An API in its simplest terms is a mechanism for one software program to communicate with another software program. The VE Python API allows users create simple programs using the Python Programming Language, to interact with a VE Model and/or Vista Results File. This gives users the option to automate many of the repetitive tasks, which up to now would have been relatively tedious.


The VE Python API will allow users to create simple python programs, to automatically:

Some simple examples of this would include:

../_images/intro_vescript_editor.png

Introduction to Python

Python is a high level interpreted programming language used for general purpose programming and scripting. The main advantage of using Python over other programming languages is its readability and user friendliness. Python has a syntax that allows programs to be expressed in fewer lines of code than would be possible in many other languages. Python has a large library of open source modules that can be easily imported and used in any project. An experienced programmer in any other language can pick up Python very quickly, however it is also quite straightforward for beginners to learn and use. Note that the VE Python API uses Python 3 not Python 2.

Before attempting to use the VE Python API, it is strongly advised that the user becomes familiar with the basics of the Python Programming Language. Specifically the user must be competent in the following areas:

Additional Resources

Many free online learning resources including:

Note that in addition to knowing the basics of Python, it is advisable that the user has experience in the VE before attempting to use the VE Python API.

3rd Party Libraries

Python version 3.12.3.


The following 3rd party python libraries are available in the VE Python environment:


PyGMO was available in previous versions of the VE Python environment. However this library is no longer included.