One Text File Away: Automating SAP2000 Section Cuts with AI
AI - "Computer programs that can complete cognitive tasks typically associated with human intelligence"
Every structural engineer who works with CSI software knows this task. To check storey shears, wall force distributions, or simply confirm that gravity loads balance, you need section cuts, one below and one above each floor, for columns and walls alike, each with its own group containing the correct elements and, crucially, only the joints on one side of the cut. In a 10-storey building, that means dozens of groups and cuts, each defined click by click. It is repetitive, slow, and one incorrectly assigned joint can silently invalidate the force summation. It becomes even more problematic when a wall or column crosses a floor level without a joint at that elevation: the cut cannot be defined properly until the element is divided there.
It is exactly the kind of task engineers tend to postpone, complex enough that automating it properly through the API feels like a programming project, yet repetitive enough to be painful on every model. We automated it in an afternoon, without writing a single line of code ourselves. This article explains how, because the same approach applies to far more than section cuts.
The key: CSI models are text files
The enabler is a decision CSI made long ago: every SAP2000 model can be fully exported to a plain text file (.s2k) and fully rebuilt from one. ETABS has its .e2k equivalent. Everything is there, joints, frames, shells, groups, load cases, section cuts, as human-readable tables. With File > Export, the entire model becomes something a text editor can open.
That matters enormously in the age of AI. Large language models are exceptionally good at reading, understanding, and generating structured text. They cannot click through dialog boxes, and using the CSI API (OAPI) requires real programming knowledge. But hand an AI an .s2k file and the task changes completely: automation becomes a text-processing problem, and text is precisely what AI handles best.
The conversation that became a tool
Instead of programming, we described the engineering problem to the AI in plain language and iterated, exactly as you would with a colleague.
PROMPT 1, THE CHALLENGE
PROMPT 2, THE DECISIVE CORRECTION
PROMPT 3, RAISING THE BAR
PROMPT 4, CLOSING THE LOOP
Notice what these prompts contain: engineering judgement, not code. What a valid section cut requires, which joints belong in the group, and why a wall must be divided at floor level. The AI supplied the implementation; each refinement was a sentence, not a debugging session. The engineer supplies the judgement, what a valid section cut is and where elements must be divided. The AI supplies the code. The text file is the bridge between the two.
The result
The outcome is a small toolkit with zero dependencies. Its centrepiece is a single HTML file that runs in any browser on any PC, with nothing to install: select the exported .s2k file, review the automatic classification in a 2D plan view, columns in red, walls in blue, and elements requiring division flagged, then click once to generate the new model file. A Python version of the same algorithm supports batch processing.

Under the hood, the generated file simply adds tables that the .s2k format already supports, readable enough for every line to be audited:
TABLE: "SECTION CUTS 1 - GENERAL"
CutName=PIL_P1_inf DefinedBy=Group Group=SC_PIL_P1_inf ResultType=Analysis
CutName=PIL_P1_sup DefinedBy=Group Group=SC_PIL_P1_sup ResultType=Analysis
CutName=PAR_P1_inf DefinedBy=Group Group=SC_PAR_P1_inf ResultType=Analysis
CutName=PAR_P1_sup DefinedBy=Group Group=SC_PAR_P1_sup ResultType=Analysis
Import the file, run the analysis, and the section-cut forces appear in the output tables, PIL_Pi_inf/sup for columns and PAR_Pi_inf/sup for walls, at every storey. Validation is built into the physics: the vertical forces from the base cuts must equal the total base reactions, and they do, exactly. What used to take hours of clicking on every project now takes seconds and is fully repeatable.
The message we want to leave is this: the biggest barrier to automation was never the technology, it was the assumption that automation requires being a programmer. With CSI's open text files on one side and AI on the other, that assumption no longer holds. Pick the repetitive task you dread most, export your model to .s2k, and start the conversation. You are, quite literally, one text file away.
.png)
.png)
.png)
.png)