Reference
Automation
NxApi, the commands, the command line and the MCP server for LLM use.
You can work on a model without the panel. This is useful for scripts and for an LLM working in Rhino.
All data of a model is in the Rhino file:
| What | Where |
|---|---|
| Element data (type, section, material, loads, supports, design attributes) | User text of the object, keys Nx_... |
| Model-wide data (load cases, combinations, annex, wind and other settings) | Document strings, keys Nx_... |
The panel writes the same keys, so a model made by a script opens normally in the panel, and the other way round.
#NxApi
NxApi reads and writes the keys from Python or C# in Rhino. Each call answers JSON.
import clr, json
from NextraDesign.Commands import NxApi
keys = json.loads(NxApi.Keys()) # every key, scope object or document
model = json.loads(NxApi.Read(doc)) # {model, errors, warnings}
print(NxApi.SetDocument(doc, "Nx_Annex", "NL")) # refuses unknown keys
print(NxApi.SetAttribute(doc, obj_id, "Nx_LimitV", "500"))
Then run with _NxRun. After writing, check that errors is empty. Check covers what the export finds. The analysis checks the rest when it starts.
From a script without Python, _-NxModelJson "C:/path/model.json" writes the same as Read.
#Commands
| Command | What it does |
|---|---|
NxPanel |
Opens the panel |
NxSetup |
Installs or checks the calculation engine |
NxActivate |
Activates a licence key (not needed during the beta: every module is open) |
NxMember, NxSurface |
Tag curves as members, surfaces as shells |
NxSupport, NxSpring, NxLine |
Supports, springs, links, joints, line supports, mesh lines |
NxSurfaceSupport |
Soil springs on surfaces |
NxRigidArea, NxDiaphragm |
Rigid parts |
NxLoad |
Adds or replaces loads |
NxConnection |
Selects or makes a connection point |
NxSection |
Analyses a drawn section and previews it |
NxSettings |
Document settings |
NxMesh |
Builds the mesh without analysis |
NxRun |
Exports, analyses and designs. Rhino stays responsive |
NxResults, NxLoadResults |
Show results, or load an existing results folder |
NxModelView, NxHover |
Model view and hover tooltips |
NxReport |
Opens the HTML report |
NxImport |
Builds tagged geometry from a .nxd model file |
NxModelJson |
Writes the model as JSON |
Other commands: NxIFC (IFC export), NxAxisVMExport and NxToAxisVM (hand the model over to AxisVM), NxRebarDrawing (2D reinforcement drawing of a concrete member), NxSectionLine (a cut line for surface results) and NxBakeJoists (draw the joists of a joist floor).
To script a command, preselect objects and give the options afterwards, for example -NxMember _Section HEA200 _Enter.
#Command line and Python
The core is a Python package with a command line tool, nxd:
nxd check model.nxd
nxd run model.nxd --json
nxd query model.nxr --combo ULS2 --member B1
nxd verify --engine all
For nxd run, exit code 0 means all checks pass, 2 means some u is above 1, and 1 means an error. Other commands are nxd schema, nxd doctor, nxd optimise, nxd connections and nxd library.
The model file is JSON (.nxd). Results are a folder (.nxr) with binary arrays, design.json, summary.json and report.html. A background worker speaks JSON-RPC 2.0 over TCP on 127.0.0.1, protected by a token.
#Use from an LLM
nxd schemaprints the JSON schema with a description for every field, units included. Give it to the model and ask for a.nxd.- Check the result with
nxd check --json. NxImportturns an LLM-written model into tagged Rhino geometry that you can inspect and edit.NxLoadResultsloads results produced outside Rhino.
#MCP server
The core ships an MCP server. Start it with nxd mcp or python -m nextra_design.mcp. It uses stdio.
| Tool | Returns |
|---|---|
nextra_schema |
The model schema, or one part of it |
nextra_validate |
Errors and combinations |
nextra_run |
Results folder, report, u_max, failing members, warnings |
nextra_results |
Compact result tables |
nextra_explain_check |
A check with its calculation trace and clause references |
nextra_optimise |
A before and after table |
nextra_library |
Library families and rows |
nextra_graph |
Questions to the structural graph: members, joints, spans, support roles (about 350 tokens per answer, see Structural graph) |
Answers are size-limited: a list that would be longer is cut, the most important items first, and the answer says what it left out.
Give absolute model paths. Inline JSON models write their results under %LOCALAPPDATA%\NextraDesign\mcp\.
Last updated 4 Nov 2026