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.

downloadspypi versiongithub stars

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
$pip install openstaad
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

The complete OpenStaad documentation is now on the web

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.

Bentley Systems ships its own automation library for STAAD.Pro v25 and v26

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.

ops.connect() is now the standard way to use OpenStaad

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 →

100% of the OpenSTAAD API is now implemented

Milestone · Feb 2026

Every function in the OpenSTAAD API is now wrapped — OpenStaad is the most complete Python library for OpenSTAAD available today.

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 verb10 in all (Create, Get, Set/Assign, Delete, …) — so people and models navigate by intent instead of memorizing names.

DomainCreateGetSet/AssignDeleteSelectTransformExecuteViewExportIsTotal
Node5183432···136
Member
Geometry41612451··235
Section & Material41222······20
Specifications107210······29
Fireproofing17·1······9
Custom Attributes1611······9
Results·12········12
View/Annotation··1····6··7
Plate
Geometry416243··1··30
Thickness & Specifications5623······16
Loads45········9
Custom Attributes1211······5
Results·11········11
Solid (3D)315233··1··27
Parametric Surface7831···1··20
Physical Member18122·····14
Material61121······20
Section/Property
Standard Table Sections10131···2··127
UPT Profiles152·2······19
Prismatic/General Properties53········8
Query & Attributes·1732······22
Load
Load Cases62453·····139
Nodal Loads & Definitions731·······11
Member Loads108···22···22
Environmental/Physical Loads113·1··2···17
Load Lists15·1······7
Combinations & Envelopes712·4·····124
Support91939······40
Group25111·····10
Analysis (Command)1436··10··125
Global Results·11·······213
Design (Steel)2114······118
View371323··172·47
Table/Report27172······28
Session/File (Root)226102···1·243
17 domains14934084701991727212729

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.

1

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.

2

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.

3

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.

4

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

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.

Keep STAAD.Pro open with your model loaded while the script runs.

Quick Start for programmers

Set it up and write the script yourself — a complete walkthrough, no prior Python experience required.

1

Prerequisites

Python

3.10+

STAAD.Pro

any version

OS

Windows only

2

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.

3

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.

4

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.

5

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

6

Install OpenStaad

pip install openstaad
7

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()}")
8

Run it

Make sure STAAD.Pro is still open with your model loaded.
python quickstart.py

You should see the node and beam counts from your model printed in the terminal.