Skip to content

midas-nx

A unified Python SDK for the MIDAS NX Open API — one package covering both MIDAS Civil NX and MIDAS Gen NX.

pip install midas-nx
from midas_nx import MidasClient, Product
from midas_nx.db.node_element import Node

client = MidasClient(mapi_key="YOUR-MAPI-KEY", product=Product.GEN)
print(client.verify_connection())
print(f"{len(Node.items(client=client))} node(s) in the current model.")

Risk level: 1 — read-only (see Risk levels). It cannot create, change, or delete anything, so it's safe to run against a real model.

Project status

Built by a MIDAS IT employee, from hands-on verification against real Gen NX and Civil NX sessions. It is an employee-led open-source project — not an officially released or supported MIDAS IT product.

  • Problems with this SDKGitHub Issues
  • Problems with the products, licensing, or the Open API service → MIDAS IT's official support channels

Read this before your first write

This SDK drives a live engineering application. Several calls can destroy unsaved work, and some have crashed the product outright. A 200 response does not mean success. Start with Destructive operations and recovery.

How would you like to start?

Learn Python and use the SDK. Install Python, then follow a guided, read-only walkthrough that explains each step. No prior programming experience assumed. → Getting started (also 한국어, 繁體中文)

Build a script with an AI coding assistant. Don't know Python well? Give your AI assistant (Claude Code, ChatGPT, Copilot, or similar) a verified context pack and a pre-run safety checklist, and describe your task in plain language. → Safe start: building with an AI coding assistant

Learn more

You want to… Go to
Run a complete task end-to-end Recipes
Understand what can break a model or a session Destructive operations and recovery
Look up a class, function or exception Reference
Know which endpoints are actually proven to work How endpoints are verified
Read the raw findings from real NX sessions Live session notes
See per-endpoint implementation status ROADMAP.md

What it covers

Every endpoint documented in the MIDAS-API manual repo is wrapped: model building (nodes, elements, materials, sections, boundaries, loads), analysis control and result extraction, construction stages, moving loads and bridge features, and the RC / steel / SRC design-code chapters.

Endpoints are typed with TypedDict payloads carrying the manual's requiredness and defaults as per-field comments. Those TypedDicts are documentation, not runtime validation — the real schemas are too conditional for one flat model, and the official documentation has been wrong often enough that this SDK records what was observed rather than what was promised.

Design in one page

  • MidasClient is an instance, not global mutable state. Pass it explicitly, or set a default with configure().
  • Errors raise, they don't exit the process. Everything descends from MidasAPIError, and a 200 carrying an {"error": ...} body raises MidasResultError rather than being handed back as a result.
  • /db/* endpoints are classes (DbResource subclasses) with create / get / items / update / delete / delete_all.
  • /doc/*, /ope/*, /view/* are plain functions, because those wrap their body in "Argument" rather than an ID-keyed "Assign".
  • Product mismatches fail before the request: a Civil-only resource called from a Gen client raises ProductMismatchError instead of a server 404.