Skip to content

LUSAS-Software/LUSAS-API-Examples

Repository files navigation

LPI-examples-cover

LUSAS API (LPI) Examples

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 v22.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

What is LUSAS?

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).

📁 Repository Structure

  • 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 examples

    Browse each directory to read more about each interaction method.

    Beginners are recommended to start with jupyter_notebook since its interactive nature allows for step-by-step code execution, immediate result display and has the ability to combine python code, text, and visualizations in a single document.

Prerequisites

  • 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.

🤖 Using AI tools alongside this repository

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.

🤝 Contributing

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.

📄 License

MIT License

🔗 Links

About

Examples of using the LUSAS Programming Interface (LPI) in Python, VBScript, Jupyter, C#, VB.Net and Grasshopper

Resources

License

Stars

Watchers

Forks