Would you like to sign out?

    🇵🇭

    Generating a 12 m span warehouse roof truss in the Philippines entirely in Python, from geometry to load combinations. From codes to Codes: Applications of API and AI to Structural Analysis and Design for Beginners (Part 1 of 2)

    Preview ended

    Fill out the form to keep watching

    Having trouble viewing the video?

    Some regions or networks may restrict Vimeo playback.

    AI Summary

    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. 

    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

    Jaydee N. Lucero Senior Structural Engineer Abinales Associates Engineers + Consultants
    Jaydee N. Lucero is a Senior Structural Engineer I at Abinales Associates Engineers Consultants, where he brings over seven (7) years of experience in the analysis, design, review and evaluation of vertical structures of various heights. He is also a programming enthusiast in C (10+ years) and Python (2 years) languages, and has delivered several talks about Python in local and international conferences and workshops. He is also an Associate Member of the Association of Structural Engineers of the Philippines (ASEP), Inc., where he is currently a member of the committees on student/academe engagement and artificial intelligence. He is currently taking his master's degree in civil engineering with specialization in structural engineering from the University of the Philippines Diliman. His specializations are reinforced concrete design, structural analysis, finite element analysis, programming, mathematics and engineering sciences.
    Get Access to the Video

    Fill out this form to watch the full video

    Once you've completed the form, you can watch anytime with unlimited replays. Access is browser-specific. Clearing cookies or switching devices requires re-authorization.

    Take a 1-Minute Survey

    Share your feedback with us

    On-Demand you might also like