OpenStaad for Python
The open-source, unofficial Python library for STAAD.Pro automation. Fully documented on the web and built for vibe coding with Claude, ChatGPT, and Gemini.
A Python library your AI assistant already understands
Connect to several STAAD.Pro models open at the same time — each gets its own ops.connect() session. No COM boilerplate, no dispatch calls: call every function straight off that single, discoverable session.
- ✓A predictable, discoverable API that Claude, ChatGPT, and Gemini autocomplete accurately
- ✓Returns native Python types (lists, ints, floats) that models reason about cleanly
- ✓Every function documented online for assistants to fetch before they write code
- ✓Runs in scripts, Jupyter notebooks, and Streamlit on any Python 3.10+ setup
from openstaad import ops
s = ops.connect()
print(s.GetSTAADFile())
print(s.GetNodeCount())
print(s.GetBeamList())
Open source vs. official libraries
Bentley Systems now ships its own Python library for STAAD.Pro, and it closely resembles an early version of our open-source library. That's fair, we take it as validation. Since then, this library and its documentation have kept evolving to stay ahead of how AI writes engineering code, and we have plenty more improvements planned: lower token consumption and a smoother vibe-coding experience with OpenStaad.
Leaner calls
Fewer tokens per operation than a raw 1:1 API wrap.
Custom helpers
Purpose-built functions, not just a mirror of the COM API.
AI-first docs
Documentation written for assistants to read and act on.
News
Docs · Jul 2026
Every function is now fully documented online — organized by structural domain and written for both engineers and AI assistants to read and act on.
Community · Jun 2026
Its official Python library closely resembles an early version of OpenStaad — we take that as validation. OpenStaad keeps evolving to stay ahead of how AI writes engineering code, and we're confident it'll stay the library people keep choosing.
v0.0.14 · Apr 2026
It replaces the old class-based pattern (root = Root(), geometry = Geometry(), …) with a single, discoverable session. The old classes are deprecated and will be removed in a future release. Read the migration guide →
Milestone · Feb 2026
Every function in the OpenSTAAD API is now wrapped — OpenStaad is the most complete Python library for OpenSTAAD available today.
Domains
Browse all →The whole documentation is restructured into 17 structural domains. The split is deliberate — it mirrors how a structure is built, how the OpenSTAAD API is organized, and, crucially, how an AI can classify a request and reach for the right command.
Larger domains break into subtopics, and inside every domain each function is grouped by an action verb — 10 in all (Create, Get, Set/Assign, Delete, …) — so people and models navigate by intent instead of memorizing names.
| Domain | Create | Get | Set/Assign | Delete | Select | Transform | Execute | View | Export | Is | Total |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Node | 5 | 18 | 3 | 4 | 3 | 2 | · | · | · | 1 | 36 |
| Member | |||||||||||
| Geometry | 4 | 16 | 1 | 2 | 4 | 5 | 1 | · | · | 2 | 35 |
| Section & Material | 4 | 12 | 2 | 2 | · | · | · | · | · | · | 20 |
| Specifications | 10 | 7 | 2 | 10 | · | · | · | · | · | · | 29 |
| Fireproofing | 1 | 7 | · | 1 | · | · | · | · | · | · | 9 |
| Custom Attributes | 1 | 6 | 1 | 1 | · | · | · | · | · | · | 9 |
| Results | · | 12 | · | · | · | · | · | · | · | · | 12 |
| View/Annotation | · | · | 1 | · | · | · | · | 6 | · | · | 7 |
| Plate | |||||||||||
| Geometry | 4 | 16 | 2 | 4 | 3 | · | · | 1 | · | · | 30 |
| Thickness & Specifications | 5 | 6 | 2 | 3 | · | · | · | · | · | · | 16 |
| Loads | 4 | 5 | · | · | · | · | · | · | · | · | 9 |
| Custom Attributes | 1 | 2 | 1 | 1 | · | · | · | · | · | · | 5 |
| Results | · | 11 | · | · | · | · | · | · | · | · | 11 |
| Solid (3D) | 3 | 15 | 2 | 3 | 3 | · | · | 1 | · | · | 27 |
| Parametric Surface | 7 | 8 | 3 | 1 | · | · | · | 1 | · | · | 20 |
| Physical Member | 1 | 8 | 1 | 2 | 2 | · | · | · | · | · | 14 |
| Material | 6 | 11 | 2 | 1 | · | · | · | · | · | · | 20 |
| Section/Property | |||||||||||
| Standard Table Sections | 10 | 13 | 1 | · | · | · | 2 | · | · | 1 | 27 |
| UPT Profiles | 15 | 2 | · | 2 | · | · | · | · | · | · | 19 |
| Prismatic/General Properties | 5 | 3 | · | · | · | · | · | · | · | · | 8 |
| Query & Attributes | · | 17 | 3 | 2 | · | · | · | · | · | · | 22 |
| Load | |||||||||||
| Load Cases | 6 | 24 | 5 | 3 | · | · | · | · | · | 1 | 39 |
| Nodal Loads & Definitions | 7 | 3 | 1 | · | · | · | · | · | · | · | 11 |
| Member Loads | 10 | 8 | · | · | · | 2 | 2 | · | · | · | 22 |
| Environmental/Physical Loads | 11 | 3 | · | 1 | · | · | 2 | · | · | · | 17 |
| Load Lists | 1 | 5 | · | 1 | · | · | · | · | · | · | 7 |
| Combinations & Envelopes | 7 | 12 | · | 4 | · | · | · | · | · | 1 | 24 |
| Support | 9 | 19 | 3 | 9 | · | · | · | · | · | · | 40 |
| Group | 2 | 5 | 1 | 1 | 1 | · | · | · | · | · | 10 |
| Analysis (Command) | 1 | 4 | 3 | 6 | · | · | 10 | · | · | 1 | 25 |
| Global Results | · | 11 | · | · | · | · | · | · | · | 2 | 13 |
| Design (Steel) | 2 | 11 | 4 | · | · | · | · | · | · | 1 | 18 |
| View | 3 | 7 | 13 | 2 | 3 | · | · | 17 | 2 | · | 47 |
| Table/Report | 2 | 7 | 17 | 2 | · | · | · | · | · | · | 28 |
| Session/File (Root) | 2 | 26 | 10 | 2 | · | · | · | 1 | · | 2 | 43 |
| 17 domains | 149 | 340 | 84 | 70 | 19 | 9 | 17 | 27 | 2 | 12 | 729 |
Quick Start for vibe coders
Let an AI coding assistant do the setup and write the script — you just describe what you want in plain language.
Prerequisites
Editor
VS Code
Assistant
Claude Code / Copilot
OS
Windows only
A paid plan is strongly recommended — turn on the most capable model (for example Claude Opus in Claude Code) so the assistant reasons through the API accurately.
Open STAAD.Pro with a model
Open STAAD.Pro and load a model that already has a few nodes and beams. OpenStaad connects to this running session — it never opens STAAD.Pro for you.
Create a project folder and open it in VS Code
Make a new, empty folder and open it in VS Code with File → Open Folder…. This is where your assistant will work.
Add an instruction.md
Create a file named instruction.md in the folder and paste this in. Your assistant reads it as project context, so it knows how to use OpenStaad before writing a line of code:
# Using OpenStaad
OpenStaad is a Python library that automates STAAD.Pro. Follow these rules whenever you write code for me.
## Before writing code
- Read the documentation at https://openstaad.com/docs and use the exact function names it lists — do not guess them.
- STAAD.Pro must already be open with a model loaded. The library connects to that running session; it never launches STAAD.Pro itself.
## Setup
- Work inside a virtual environment: `python -m venv venv`, activate it (`venv\Scripts\activate` on Windows), then `pip install openstaad`.
## Usage
- The entry point is a single session: `from openstaad import ops` then `s = ops.connect()`, which attaches to the active STAAD.Pro model.
- If several models are open and you need a specific one, pass its file path: `s = ops.connect(r"C:\path\to\model.std")`.
- Call every function off that session, e.g. `s.GetNodeCount()` or `s.GetBeamList()`.
- Functions return native Python types (lists, ints, floats).
- To drive several open models at once, create one session per model.
## Style
- Keep scripts small and explain each step.
- Verify every function name and its arguments against the docs before using it.
Describe what you want — then run it
Tell the assistant your goal in plain language (for example, “print how many nodes and beams my model has”). Following instruction.md, it sets up the virtual environment, installs OpenStaad, writes the script, and runs it.
Quick Start for programmers
Set it up and write the script yourself — a complete walkthrough, no prior Python experience required.
Prerequisites
Python
3.10+
STAAD.Pro
any version
OS
Windows only
Open STAAD.Pro with a model
Open STAAD.Pro and load (or create) a structural file that already has a few nodes and beams in it. OpenStaad connects to this running session — it doesn't open STAAD.Pro for you, so it needs to already be running with a model loaded before you go any further.
Create a project folder
Create a new, empty folder anywhere you like — for example, a folder named openstaad-quickstart on your Desktop. This is where your script and its Python environment will live.
Open the folder in a code editor
We recommend Visual Studio Code (free). Open it, then File → Open Folder… and pick the folder you just created. Then open a terminal inside it with Terminal → New Terminal — you'll use it for every command below.
Create and activate a virtual environment
A virtual environment keeps OpenStaad's install isolated to this folder. In the terminal you just opened, run:
python -m venv venv
venv\Scripts\activate
You'll know it worked when the prompt starts showing (venv).
Install OpenStaad
pip install openstaad
Write the script
Still in VS Code, create a new file named quickstart.py inside your folder, then copy and paste this into it:
from openstaad import ops
s = ops.connect()
print(f"Nodes: {s.GetNodeCount()}")
print(f"Beams: {s.GetBeamList()}")
Run it
python quickstart.py
You should see the node and beam counts from your model printed in the terminal.
Support on Ko-fi