This repository provides practical and minimal examples of using the LUSAS Programming Interface (LPI) in Python, VBScript, Jupyter, and C#.
These examples are tailored for LUSAS v23.0 (see repository branches for other versions).
The full LPI documentation can be found inside the LUSAS installation folder at:
C:\Program Files (x86)\LUSAS220\Programs (x86)\LPIHelp\lpi.html
LUSAS is a powerful finite element analysis software used for structural, bridge, geotechnical, and general engineering simulation. The LUSAS Programming Interface (LPI) allows automation of model generation, material assignment, loading, solving, and result extraction (read more about it on the website).
-
python/– Python examples -
jupyter_notebook/– Python code blocks notebooks -
vbscript/– Legacy examples in VBScript (default LUSAS command bar language) -
dotnet/– .NET interop examples (C# & VB.NET) -
grasshopper/– Rhinoceros Grasshopper examplesBrowse each directory to read more about each interaction method.
Beginners are recommended to start with
jupyter_notebooksince its interactive nature allows for step-by-step code execution, immediate result display and has the ability to combinepythoncode, text, and visualizations in a single document.
-
Installed LUSAS v22+
Most scripts will work with the free evaluation licence, however the use of a full or academic licence is recommended.
The latest LUSAS installer can be found at the downloads section of the official website.
-
For Python and Jupyter Notebook examples:
- Installed Python (v3+)
-
For C# examples:
- Visual Studio 2019
-
For Grasshopper examples:
- Rhinoceros (v8.08 or later)
- Grasshopper LUSAS plugin
For step by step installation guides, see each relevant directory.
To get started running the examples in this repository:
- Select the correct branch for your LUSAS version (top of page).
- Get the files from
Code>Download ZIP(top of page). - Follow the instructions to install and set up python and jupyter notebooks.
See the use AI tools guide for tips on leveraging AI assistants (such as GitHub Copilot) to explore, generate, and understand code examples in this repository. The guide covers common AI-assisted workflows, troubleshooting, and best practices to maximize productivity with LUSAS API examples.
We welcome contributions! You can contribute by:
- Asking API Questions: Open an Issue for questions.
- Sharing Examples: Submit a Pull Request or open an Issue with your code.
MIT License
- LUSAS Official Site
- Grasshopper LUSAS plug in
- LUSAS LPI Customisation and Automation Guide (LPI & VBS)
- LUSAS LPI Developer Guide (.NET & COM)
- Using Python with LUSAS Modeller (Python)

