Post / result extraction¶
/post/TABLE (ch18-23) extracts pre-process summaries, analysis results,
story tables, and design forces. Every table type shares one HTTP endpoint —
a TABLE_TYPE string selects which table comes back — and one response
shape ({FORCE, DIST, HEAD, DATA}), so post/base.py provides the shared
plumbing once rather than a class per table.
See ROADMAP.md for the full list of table types.
Shared plumbing¶
midas_nx.post.base
¶
Shared plumbing for /post/TABLE — extracts pre-process, analysis-result,
and story summary tables. Source: docs/manual/18_POST_PreProcess.md through
21_POST_StoryTables.md.
Every /post/TABLE call shares one endpoint and one POST-only wrapper
("Argument", not ID-keyed "Assign" like /db/*) — a TABLE_TYPE
string selects which table is extracted, so this is one generic function
rather than a DbResource-per-table-type. The response shape
({FORCE, DIST, HEAD, DATA}) is identical across every table type; HEAD's
column names vary per table and are only knowable from TABLE_TYPE, so the
response is returned as a plain dict rather than typed further.
NodeElemsSelector
¶
Bases: TypedDict
Target-scope selector accepted by a handful of table types (e.g. Element Weight) — set exactly one of KEYS/TO/STRUCTURE_GROUP_NAME; omitting NODE_ELEMS entirely selects all nodes/elements.
TableUnit
¶
Bases: TypedDict
Response unit override, accepted by the Story-series table types.
TableStyles
¶
Bases: TypedDict
Response number-format override, accepted by the Story-series table types.
NodeFlag
¶
Bases: TypedDict
Per-DOF output-location flag accepted by a subset of ch20's plate/plane stress-force table types — see get_table()'s node_flag parameter docstring.
get_table(table_type, table_name='', *, export_path=None, node_elems=None, unit=None, styles=None, components=None, load_case_names=None, opt_cs=None, stage_step=None, parts=None, story_names=None, modes=None, average_nodal_result=None, node_flag=None, additional=None, set_calculation_method=None, client=None)
¶
POST /post/TABLE — extract one result table.
table_type: the table's TABLE_TYPE value (see pre_process.py/result_1.py/
story.py/design.py for the documented constants).
table_name: response table title. The manual documents it as also becoming
the response's top-level key, e.g.
{table_name: {"FORCE": ..., "DIST": ..., "HEAD": [...], "DATA": [...]}} —
but live sessions have returned other keys for the same call ("Result
Table", "empty"), so don't index the response by name. Use
:func:unwrap_table below, which finds the table by shape instead.
node_elems/unit/styles/components: only meaningful for the specific table
types documented as supporting them — see each caller's docstring.
EIGENVALUEMODE is the one table that fails without components, so
leaving it out there sends :data:EIGENVALUE_MODE_DEFAULT_COMPONENTS.
load_case_names: analysis-result tables (ch19-21) — load/combination
names with a type suffix, e.g. "DL(ST)", "COMB1(CB)", "CS1(CS)". Also
accepted by ch18's Story Load Summary Table as of the 2026-08-06 manual
update, whose own example spells the suffix with a leading space
("DL (ST)") rather than ch19-21's "DL(ST)" — a manual-source
inconsistency, not a call-site-specific requirement to enforce here.
opt_cs/stage_step: analysis-result tables only (ch19-21) — enable and
select construction-stage steps, e.g. ["CS1:001(first)", "CS1:002(last)"].
opt_cs has three states, and leaving it out is not the same as
False: per the manual (2026-09-15 sync, quoting the official Reaction
article), True switches the view to Construction Stage and returns CS
results, False switches it to PostCS (the final stage) and returns Post
results, and omitting it keeps the current view mode. The default None
omits it. The manual's own Default column still says false, which that
description contradicts, and the behaviour has not been checked live.
parts: design-force tables (ch23) only — member end/location or top/bot
part selection, e.g. ["PartI", "PartJ"]. Not Wall Force (ch20) — MIDASIT
confirmed 2026-07-30 that table type never supported
PARTS or SECT_POSITION; both were removed from the official article, and
this SDK's own get_wall_force_table() no longer accepts either.
story_names: Story-series (ch21) and Wall Force (ch20) tables — restrict
to specific story names; omitting it selects all stories. Also accepted
by Wall Design Forces (ch23) as of the 2026-08-06 manual update;
that endpoint's own Specifications table numbers it as
param 9, alongside the existing member-scope/unit/style/component
params.
modes: Story Mode Shape (ch21) only — mode filter, e.g. ["Mode1", "Mode2"];
omitting it returns all modes.
average_nodal_result: ch20's plate/plane-stress/strain/axisymmetric result
tables only (20_POST_AnalysisResult_2.md sections 1-19, 23-25 — not every
table in that chapter; sections 20-21, Solid Force, never had it). Added
2026-08-27 per the manual's 2026-08-26 re-verification (this whole
parameter, and node_flag below, were missing from every affected
section's docs before that pass, not called out as table-specific until
then). Live-confirmed accepted (not rejected as an unrecognized field) on
Gen NX via PLATESTRESSL: without a real analysis result the call still
fails, but with the same "no analysis result" error whether or not this
field is present, not a shape-rejection error.
node_flag: a smaller subset of the same ch20 tables (sections 3-7, 10-11,
14-15, 18-19, 22-25) — element-center (CENTER) vs. per-node (NODES)
output selection. Same 2026-08-27 addition and live-confirmation as
average_nodal_result above.
additional: Story-series tables (ch21) only — the table-type-specific
"ADDITIONAL" object (angle/Beta/node-selection/... settings); see each
story.py caller's docstring and TypedDict for its shape.
set_calculation_method: Weight Irregularity Check (ch21) only — unlike
every other story table, the manual places this field directly under
"Argument" rather than nesting it in "ADDITIONAL".
unwrap_table(response)
¶
Pull the {FORCE, DIST, HEAD, DATA} table out of a get_table()
response, whatever its top-level key happens to be.
The DbResource-side counterpart is DbResource.items(). Matching on
shape rather than on the key name is deliberate: the same call has been
seen returning "Result Table" and "empty" as its top-level key
across sessions, in addition to the TABLE_NAME the manual documents,
so response[table_name] is not safe. Returns {} when the response
carries no table (e.g. a zero-row {"message": ""}).
Example::
raw = get_reaction_table(load_case_names=["DL(ST)"])
table = unwrap_table(raw)
for row in table.get("DATA", []):
...
Example table getters¶
midas_nx.post.result_1
¶
Source: docs/manual/19_POST_AnalysisResult_1.md, items 1-13, and docs/manual/20_POST_AnalysisResult_2.md, items 1-39.
All functions POST to the shared /post/TABLE endpoint — see post/base.py.
get_reaction_table(table_type=TABLE_TYPE_REACTION_GLOBAL, table_name='', *, node_elems=None, unit=None, styles=None, components=None, load_case_names=None, opt_cs=None, stage_step=None, client=None)
¶
docs/manual/19_POST_AnalysisResult_1.md #1 — Reaction.
table_type: TABLE_TYPE_REACTION_GLOBAL (default), _LOCAL, or _LOCAL_SURFACE_SPRING. opt_cs/stage_step are not supported for the Local Surface Spring variant per the manual.
get_displacement_table(table_type=TABLE_TYPE_DISPLACEMENT_GLOBAL, table_name='', *, node_elems=None, unit=None, styles=None, components=None, load_case_names=None, opt_cs=None, stage_step=None, client=None)
¶
docs/manual/19_POST_AnalysisResult_1.md #2 — Displacements.
table_type: TABLE_TYPE_DISPLACEMENT_GLOBAL (default) or _LOCAL.
midas_nx.post.pre_process
¶
Source: docs/manual/18_POST_PreProcess.md, items 1-10.
All functions POST to the shared /post/TABLE endpoint — see post/base.py.
get_element_weight_table(table_name='', *, node_elems=None, client=None)
¶
docs/manual/18_POST_PreProcess.md #1 — Element Weight Table.
node_elems: target scope (exactly one of KEYS/TO/STRUCTURE_GROUP_NAME); omit for all elements.
midas_nx.post.story
¶
Source: docs/manual/21_POST_StoryTables.md, items 1-17.
All functions POST to the shared /post/TABLE endpoint — see post/base.py.
The manual declares one common Argument parameter table that applies uniformly to all 17 story tables (TABLE_NAME, TABLE_TYPE, EXPORT_PATH, UNIT, STYLES, COMPONENTS, NODE_ELEMS, LOAD_CASE_NAMES, OPT_CS, STAGE_STEP) rather than documenting a per-table subset like ch18 did, so every wrapper below exposes the full common kwarg set (mirroring get_table's own signature).
2026-07-24: the manual additionally documented per-table STORY_NAMES/MODES fields and table-specific "ADDITIONAL" objects (angle/Beta/node-selection/ calculation-method settings) for 10 of the 17 tables — each affected wrapper below exposes its own typed additional/story_names/modes/ set_calculation_method kwarg; see the TypedDicts declared after the TABLE_TYPE_* constants for each table's exact shape.
⚠️ Live-tested: on a real analyzed model with valid load_case_names,
these story tables can still return {"error": {"message": "[empty]
Cannot generate table data as there is no analysis result."}} even
though post/result_1.py's node/element-level tables (reaction,
displacement, beam force, ...) work fine against the same analysis. The
fix was calling ope.calculate_story(...) (/ope/STOR) before
doc.analyze() — story-level aggregates (weight/stiffness centers,
eccentricity, overturning moment, etc.) appear to need that explicit
calculation step baked into the analysis run, not just derivable
after-the-fact from raw nodal results. See
docs/live_verification_notes.md for the full reproduction.
get_story_drift_table(table_type=TABLE_TYPE_STORY_DRIFT_COMB, table_name='', *, unit=None, styles=None, components=None, node_elems=None, load_case_names=None, opt_cs=None, stage_step=None, additional=None, client=None)
¶
docs/manual/21_POST_StoryTables.md #1 — Story Drift.
table_type: TABLE_TYPE_STORY_DRIFT_X/_Y (single-direction) or TABLE_TYPE_STORY_DRIFT_COMB (combined, adds shear-weighted/selected-node detail columns). additional: drift-ratio judgment method/parameters, plus (COMB only) which drift-basis columns to include — see StoryDriftAdditional.