OpenVSP API Documentation 3.41.2
 
Loading...
Searching...
No Matches
Documentation for the OpenVSP API

This is the documentation for the classes, enumerations, and functions available in the OpenVSP API.

The API functions are organized into the following groups:

The OpenVSP API classes with member functions are identified here:

Help

Overview

OpenVSP includes an API written in C++ that exposes all of the functionality of the GUI to a programming interface. This allows OpenVSP modeling and analysis tools to be run on headless systems, directly integrated with external software programs, and automated for trade studies and optimization purposes. The OpenVSP API & MATLAB/Python Integration presentation from the 2020 OpenVSP Workshop is a good resource to learn more about the API. For specific API questions, the OpenVSP Google Group is available.

Examples

OpenVSP API examples are available in the scripts directory of the distribution. These example scripts are written in AngelScript, but map very closely for the Python API. CustomGeom examples, also written in Angelscipt, are available in the CustomScripts directory. An example for using the Python API can be found in python/openvsp/openvsp/tests. The matlab_api directory includes examples for the MATLAB API in the form of test suites.

Angelscript

All OpenVSP C++ API functions are registered with Angelscript, a language that is virtually identical in syntax to C++. API functions can be called from *.vspscript files and then run from either the GUI (File -> Run Script...) or through the vspscript executable's command line interface. Custom Geom scripts, identified by the *.vsppart file extension, also call API functions. These scripts are loaded automatically when OpenVSP is launched. Note, all models saved with a Custom Geom will include the *.vsppart code in the *.vsp3 file.

Python API Instructions

View the README file in the python directory of the distribution for instructions on Python API installation. Note, the Python version must be the same as what OpenVSP was compiled with. For instance OpenVSP 3.21.2 Win64 requires Python 3.6-x64. If a different version of Python is desired, the user must compile OpenVSP themselves.

MATLAB API

The MATLAB API template (matlab_api) is included with the OpenVSP source code, but not the distributed binaries. This is because it requires an unreleased branch of SWIG and MATLAB with a valid license. Users are able to build the MATLAB API if they are willing to compile OpenVSP themselves. Presentations on compiling OpenVSP and building the MATLAB API are available from the 2020 OpenVSP Workshop

Improvements

Users

Users are encouraged to make use of the GitHub Issue Tracker if they have a suggestions, feature request, or bug report for the OpenVSP developers. Please add an issue if an API function or capability is missing, not working correctly, or poorly documented.

Links