Fill out the form to keep watching
Having trouble viewing the video?
Some regions or networks may restrict Vimeo playback.
What this session does Takes a roof truss from an empty model to an optimized section list without opening the interface.
What the session covers:
- Modeling, load input and analysis in one Python script
- NSCP roof Cp interpolation written into the code
- DCR-driven section iteration to a 2% weight convergence
- Full example script published for reuse
Best suited when deciding how to apply the MIDAS GEN NX API within model generation and section optimization workflows.
Your submission has been
successfully received
If you meet the certification criteria,
Your Certificate of Completion will be sent to your email.
If you need urgent support, contact us via
here.
We truly appreciate your participation!
Open Access Has Ended
The open access period has ended.
If you have a MIDAS account, sign in
and complete the access form to watch this session.
Full access is one step away 👀
Complete a short form to continue
Description
| Part 1 of 2Part 2 builds a Python GUI on a different model to run the analysis and pull results. | Coming September 30 |
Moving results between a MIDAS GEN NX model, Excel, and a separate calculation program is repetitive, hard to version, and easy to break by hand. This first part covers the MIDAS GEN NX API as a direct connection between the model and Python code: what the four HTTP request types do, how a script authenticates with the MAPI key issued by the running MIDAS GEN NX session, and what the setup needs — Python with the midas_gen library, an IDE, and a virtual environment holding NumPy, Polars, Matplotlib, scikit-learn, and SteelPy for AISC section properties. The complete Python script for the example is published as a repository and linked by QR code on the slides, so the session can be followed line by line and the code reused directly.
The example builds a 12 m span warehouse roof truss in an empty model without drawing anything in the interface. Geometry, A36 material, four section groups (double-angle chords, single-angle verticals and diagonals), elements and supports are all created from the script, and member end releases are written as a raw JSON POST request because that function is not yet exposed in the library. Loads follow the same route: dead, roof live and four wind cases generated in code, with roof Cp values interpolated from NSCP tables, then load combinations and envelopes.
The script does not stop at a finished model. It triggers the run, reads beam forces back, computes steel quantity through SteelPy, and evaluates DCR against tension yielding and rupture, buckling, and slenderness, resizing sections by A_i = A_(i-1) × DCR^0.6 until DCR approaches 1.0 and total steel weight changes by less than 2% between iterations.
Key Points
Connecting Python to MIDAS GEN NX with an MAPI key and the midas_gen library
Building the model in code: nodes, materials, sections, elements, supports, releases
Writing a raw JSON POST where the library has no function yet
Generating load cases and NSCP wind pressures with roof Cp interpolation
Running the analysis and iterating sections on DCR to a 2% weight convergence
Reusing the published example script, QR-linked on the slides
Speaker