What is OpenStaad Python?
⚠️ Important Note: OpenStaad Python requires an active and valid Staad.PRO file to function properly.
OpenStaad Python (OPS) is a library designed to simplify interaction with the OpenStaad API. It provides an intuitive and user-friendly interface that allows structural engineers and developers to automate common tasks in Staad.PRO efficiently.
Why Use OpenStaad Python?
- Easy to Use: Provides a simplified API that reduces the complexity of working directly with OpenStaad.
- Automation: Enables automation of repetitive tasks such as model creation, analysis, and result extraction.
- Integration: Compatible with Python, making it easy to integrate with other libraries and tools.
- Clear Documentation: Designed to be easy to learn and use, with practical examples.
Installation
You can easily install OpenStaad Python using pip:
pip install openstaad
Getting Started
Make sure you have Staad.PRO installed and a valid file open before using OpenStaad Python.
Basic Example
from openstaad import ops
s = ops.connect()
beam_list = s.GetBeamList()
beam_nodes = s.GetMemberIncidence(10)
print("Beam list:", beam_list)
print("Beam nodes:", beam_nodes)
Key Features
- Access Geometry: Get detailed information about structural elements such as beams, nodes, and plates.
- Model Control: Create, save, and analyze models directly from Python.
- Customizable Units: Work with different unit systems as per your needs — see the Unit Systems guide for what OpenStaad returns and why.
- Analysis Results: Extract results like displacements, forces, and moments programmatically.
Using OpenStaad with AI Assistants
This documentation is published in a form that AI assistants can read directly:
/llms.txt: an index of every page, with the rules an assistant needs to write correct openstaad code (session API, base units)./llms-full.txt: the whole reference in a single file.- Every doc page has a plain-markdown twin at the same URL plus
.md, e.g./docs/node.md.
If you work with a coding agent such as Claude Code, Gemini CLI, Codex or Cursor, add this to your project's CLAUDE.md or AGENTS.md:
This project automates STAAD.Pro with the `openstaad` Python library.
Before writing openstaad code, read https://www.openstaad.com/llms.txt and follow its rules.
Use `from openstaad import ops; s = ops.connect()` and call every function on `s`.
Always check `s.GetBaseUnit()` before interpreting any number.
Additional Resources
Start exploring the possibilities with OpenStaad Python and take your structural projects to the next level!