Structural Project from an Architectural DXF Plan
1. About this scenario
One of the most common jobs is this: you have the architect's DXF plan and want to produce from it a structural model, a calculation report and structural drawings (formwork and foundation plans, developments) in StatiCAD. This article explains how to have an AI agent do the whole job: the agent reads and interprets the DXF file itself, then draws the model in StatiCAD with commands, runs the analysis and writes the report and the drawings to files. At every stage you see the result and approve or correct it.
| Requirement | Description |
|---|---|
| Agent | Claude Code (recommended) or Codex. The built-in assistant is not suitable for this job: it cannot read the DXF file. |
| StatiCAD | Ultimate or Hybrid (with the terminal channel, --term). For other editions, see section 9. |
| DXF file | Architectural storey plan; if it is a DWG, first save it as DXF (section 4). |
| Structural information | Structure type, number and heights of storeys, material, code and earthquake values, known sections. The architectural plan does not contain these; the agent will ask you. |
Setup first: Installing Claude Code, opening StatiCAD with --term and the first prompt are described in the Claude Code article. This article assumes that the steps there have been completed.
2. How does the AI read the DXF?
DXF is a drawing file in plain-text format. The agent does not see it like an image; it writes a small program (script) and reads the data inside it: which object is on which layer, what its coordinates are, which block is used where. For this reason, the agent also sees everything that you do not see on the screen (4.3). The information it uses for the interpretation:
| Information in the DXF | What the agent uses it for |
|---|---|
| Lines and polylines (LINE, LWPOLYLINE) | Derives the wall axis and thickness from pairs of parallel edge lines, and the grid lines from the axis lines. |
| Blocks (INSERT) | Finds the position and width of door, window and column blocks. Block names (e.g. DOOR_90, WINDOW_120) make recognition easier. |
| Layer names | Names such as WALL, COLUMN, GRID, WINDOW indicate the element type. If the names are unclear, the agent asks you. |
| Hatches (HATCH) | Solid-hatched rectangles are often reinforced concrete column and shear wall sections. |
| Arcs (ARC) | Door swing arcs are not elements. Curved walls are approximated with short straight segments. |
| Texts and dimensions (TEXT, MTEXT, DIMENSION) | Room names, levels and dimension values are used to verify the interpretation. |
| Unit setting ($INSUNITS) | Shows whether the drawing is in mm, cm or m; the unit in StatiCAD is cm. |
3. Coordinates: unit, axes and origin
- Unit: Architectural drawings are mostly in cm or mm. The agent verifies the unit from the file and from a known dimension (e.g. a door width, a dimension text) and converts everything to cm.
- Y axis: In DXF, Y points up, while in StatiCAD it points down on the screen. If the agent does not mirror Y, the plan is drawn vertically flipped (a mirror image). Say so in the prompt and check the plan after the first walls.
- Origin: Taking the bottom-left corner of the plan (or the first grid line intersection) as (0,0) makes the coordinates easy to read.
- Storeys: In StatiCAD, storeys start from 1; foundations are drawn on storey 0 (TEMEL).
Stop after the first walls: A direction, scale or mirroring error shows up in the first few walls. Have the agent take a screenshot after the first walls and compare it with the plan; if there is no problem, let it continue.
4. Preparing the DXF file
The agent can also read a complex file; but the less unnecessary content the file has, the faster and more accurate the interpretation. The preparation below is for AutoCAD; in programs such as BricsCAD, ZWCAD and GstarCAD the commands have the same names. If you put an underscore in front of the commands (_PURGE), they also work in non-English versions of the interface.
4.1. Is cleanup necessary?
| Reading by the AI (this article) | StatiCAD's Import 2D tool (manual) | |
|---|---|---|
| Accepted objects | All: line, polyline, block, hatch, text, dimension | Only LINE (line); polylines and blocks are not accepted |
| Exploding (EXPLODE) | Not needed; do not explode blocks, block names help to recognize doors and windows | Needed: polylines and blocks must be exploded |
| Selection | The agent finds the elements itself | For each element, the two edge lines are selected by dragging with the mouse; if extra objects are caught, the “2 adet çizgi seçiniz” (Select 2 lines) warning appears |
| Cleanup | Recommended (speed and accuracy); not mandatory | Required: objects such as furniture, hatches and dimensions disturb the selection |
In short: for the agent, delete what is unnecessary, but do not explode.
4.2. Recommended preparation steps
- Move the plan to a separate file. Selecting the plan of one storey and writing it to a new file with
_WBLOCKis the cleanest way: the new file contains only the objects you selected and the definitions they use; layout sheets, title blocks, sections and the drawings of other storeys are left out. Preparing a separate file for each storey makes the interpretation easier. - Delete unnecessary objects; do not just hide them. Furniture, landscaping, building services, hatch patterns, annotation texts. Turning a layer off or freezing it does not remove the objects from the file (4.3). You can leave the dimensions and room names; the agent uses them to verify the interpretation.
- Clean up: Run
_PURGE› Purge All (including nested items) several times until there is nothing left to purge; then fix file errors with_AUDIT. - Real size and unit: The drawing must be at 1:1 scale. Measure a known dimension (e.g. the length of a wall) with
_DISTto verify the unit. - Flat plan: All objects must lie in the Z = 0 plane (use
_FLATTENif necessary). - Origin (optional): Move the bottom-left corner of the plan to (0,0). If you do not, the agent applies the offset itself.
- Save as DXF:
_SAVEAS› file type AutoCAD 2013 DXF (or 2010/2018; text format). DWG is a binary format; the agent cannot read it directly.
4.3. Why do deleted objects appear? What does PURGE do?
The agent sometimes reports objects that you think you have deleted. The reason is almost always that the object is still in the file:
| Situation | Reason | Solution |
|---|---|---|
| Objects on layers that are off or frozen | They are not visible on the screen but remain in the file. | Delete the objects or the layer. If you cannot delete them, tell the agent “ignore these layers”. |
| Unused block definitions | The content of blocks that are not inserted in the plan remains in the block section of the file. | _PURGE (purge all, including nested items). |
| Layout sheets | Title block, elevations and notes are in paper space. | Write only the plan objects to a new file with _WBLOCK, or tell the agent to read only model space. |
| Old drawings left far away from the plan | Revisions or details forgotten in model space, outside the screen. | Look at the drawing extents reported by the agent; delete the distant pieces. |
| Incremental save remnants in DWG | AutoCAD's incremental save (when ISAVEPERCENT is not 0) can leave the data of deleted objects in the DWG file for a while; some readers display them. | Save the file as DXF, or set ISAVEPERCENT to 0 and save the file again. |
Short answer: PURGE does not clean up deleted objects but unused definitions (blocks, layers, text and line styles); it makes the file smaller and prevents invisible block contents from interfering with the interpretation. First delete the objects you do not want to appear, then run PURGE and AUDIT, and finally save as DXF. A DXF file written by AutoCAD contains no deleted objects.
4.4. Layer names and information to give the agent
- If the wall, column, window, door and grid lines are on separate, clearly named layers, the interpretation is much more reliable. If the architect's layer names are different, tell the agent: “the walls are on the A-WALL layer, the columns on A-COLS”.
- If the plan contains more than one storey, state which area is which storey, or move the storeys to separate files.
- Give the agent the storey heights, slab thicknesses and known sections in writing; the architectural plan does not contain this information.
5. Step-by-step workflow
Divide the job into stages and approve the result at the end of each stage. Use the prompts below in order; change the folder, file and values to suit your own project.
5.1. Stage 1 — Discovery: what is in the file?
Put the DXF in the C:\StatiCAD\AI_Projeler folder, open StatiCAD with --term and start a new session in Claude Code:
Read the AGENTS.md and YARDIM_AI_KOMUTLAR.md files in the C:\StatiCAD\Ultimatex64 folder.
Then read the architectural plan C:\StatiCAD\AI_Projeler\zemin_kat.dxf with a script (install Python and ezdxf if necessary); do not paste the whole file into the chat.
Report the following to me:
- drawing unit and drawing extents (minimum / maximum X, Y),
- layers, the object types on each layer and their counts,
- block names and how many times they are used,
- texts (room names, levels) and dimensions,
- objects on layers that are off or frozen, objects outside model space (layout) and drawing fragments far away from the plan.
Do not draw anything in StatiCAD yet.
In Hybrid, write the first line like this: “Read the YARDIM_AI_KOMUTLAR.md and AI_Terminal_yardim.md files in the C:\StatiCAD\Hybrid folder (this edition has no AGENTS.md).” For editions without a terminal, see section 9.
Read the report. If there are layers or objects that you did not expect, clean up the DXF as described in section 4, or tell the agent what to ignore.
5.2. Stage 2 — Interpretation: which line is which element?
Interpret this plan for the structural model and show it as a table:
- walls: start and end coordinates of the axis, thickness,
- columns and shear walls: centre or corner coordinates, dimensions,
- doors and windows: the wall they are in, position, width,
- grid lines.
Convert the coordinates to cm, mirror the Y axis (in StatiCAD, Y points down on the screen) and take the bottom-left corner of the plan as (0,0).
Write everything you are not sure about in a separate list; do not make up dimensions.
Also draw your interpretation as a PNG image so that I can check it.
Compare the table and the image with the plan: wall thicknesses, opening widths, column positions. Write down what is wrong or missing; the agent corrects the interpretation.
5.3. Stage 3 — Project settings and drawing the model
I approve the interpretation. Corrections: [write them here].
Do the following in StatiCAD:
1. Open a new project (if a project is open, ask me first).
2. Code TBDY 2018, building type masonry, 2 storeys, storey height 280 cm; soil class ZC, SS = 1.2, S1 = 0.35 (example values).
3. Draw the walls, doors and windows and slabs of the ground storey, and the foundations on storey 0.
4. After the first few walls, check the orientation and scale of the plan with a screenshot and show it to me; if there is no problem, continue.
5. Draw the first storey from the same plan.
At the end of each step, briefly summarize what you have drawn.
- In a masonry building, when doors and windows are drawn, the wall is split automatically and a bond beam is placed above it.
- After drawing, the agent shows you the model with a screenshot. Also look at the plan and 3D views in StatiCAD yourself.
- The StatiCAD terminal does not have a storey copy command yet; the agent redraws similar storeys from the same interpretation.
5.4. Stage 4 — Analysis, calculation report and structural drawings
Run the analysis. Explain the warnings and insufficient elements in order of importance; first present your correction suggestions to me and do not change values without my approval.
After approval:
- save the project as C:\StatiCAD\AI_Projeler\bina1.sy4,
- create all reports and export them as C:\StatiCAD\AI_Projeler\bina1_rapor.pdf,
- draw the formwork and foundation plans and save them as C:\StatiCAD\AI_Projeler\bina1_planlar.dxf,
- verify the created files on disk and list them.
In the demo version: Report and DXF export are disabled in demo installations; the model can be built and analysed.
6. Notes by structure type
| Structure type | From the architectural plan | What you need to provide |
|---|---|---|
| Masonry | Wall positions and thicknesses, door and window openings | Wall material, slab type and thickness, bond beam and foundation dimensions, storey heights |
| Reinforced concrete | Column and shear wall sections (mostly hatched areas), grid lines | Beam layout and sections (usually not in the architectural plan; the agent makes a proposal from the grid and wall lines, you approve it), concrete and steel class, slab thickness |
| Timber and steel | Wall and column positions | Material class (e.g. C24), sections, connection assumptions |
For no structure type should the agent make up these values by itself; the sentence “ask me for any value you do not know” in the prompts ensures this.
7. Limitations and points to watch
- An architectural plan is not a structural project. The model built by the agent becomes meaningful with the structural assumptions given with your approval. Decisions on the load-bearing system and checking the results are the responsibility of the responsible engineer.
- Interpretation errors: lines that do not touch or that overlap, walls with changing thickness, inclined and curved walls, and multi-layer wall sections (plaster, insulation) may be interpreted wrongly. This is why the table and the image in Stage 2 are important.
- Node connections: after drawing, check that the wall ends are connected; the analysis warnings show open ends and disconnected elements.
- Large files: the agent reads the DXF with a script and does not paste the whole file into the chat; still, very large and complex files slow it down. Split the storeys into separate files.
- Usage limit: on long projects, Claude Pro's periodic usage limit may be reached. Dividing the job into stages and doing each storey in a separate session eases the limit.
8. Alternative: StatiCAD's own Import 2D tool
You can also turn the architectural plan into a model without using AI: File › Import 2D (or DWG Import on the start screen) opens the DWG/DXF plan in the TechnicDraw editor; the element type is selected on the Import Toolbar, and the two edge lines of the wall are selected by dragging with the mouse. This tool accepts only LINE objects: first explode polylines and blocks (EXPLODE), simplify the drawing, move the reference corner to (0,0) and set the unit to cm. Details are in section 12.1 of the StatiCAD User Guide.
9. Editions without a terminal
The Profesyonel, Standart, Betonarme and Yığma editions have no terminal channel. The agent can still read and interpret the DXF; it draws the model through the screen with computer use, by typing the wall command (w) and the corner coordinates on StatiCAD's bottom command line. This route is much slower; it is suitable for small plans and single-storey structures. Ask for a check with a screenshot at every stage.
- If the command line is not visible on the main screen, open it with the command line icon on the bottom toolbar or with the Program Settings › Automatic Operations › Show Command Line option.
- Send the prompt below as the first message of the session. Change the folder and program name to suit your edition (list in the computer use article).
- Then use the Stage 1–4 prompts in order; remove the first line of the Stage 1 prompt (reading AGENTS.md).
I am using StatiCAD Profesyonel; the program file is C:\StatiCAD\V10ProX64\StatiCAD.exe. This edition has no terminal channel: you will read and interpret the DXF plan with a script and draw the model through the screen with computer use.
Follow these rules while drawing:
- Draw the walls from the bottom command line: type w in the input box and press Enter, check the wall width and element type in the Wall Properties dialog and press OK, then type X,Y for each corner and press Enter (@dX,dY also works). When the wall chain is finished, right-click in the drawing area.
- The unit is cm; X points to the right and Y points down on the screen. Mirror the Y values from the DXF.
- When the main window has the focus, Shift+letter is a shortcut. Before typing, verify that the focus is on the command line; use lowercase letters on the command line.
- Draw the foundations on the TEMEL storey (storey 0); switch between storeys with Ctrl+Up Arrow and Ctrl+Down Arrow.
- After the first two walls, fit the model to the screen with Z.Hepsi, compare the screenshot with the plan and show it to me.
- If the program is open, do not start it a second time. Ask me before overwriting existing files and before closing the program.
For now, do not draw anything: take a screenshot of the main screen, verify that the command line is open and wait for my next request.
Agent instruction files: The instruction files prepared for agents (AGENTS.md and a working guide specific to computer use) are only included in the Ultimate installation. In other editions, the prompt above itself gives the agent the most essential rules from these files.
The plan, price and menu names of Anthropic, OpenAI and Google services may change over time; for up-to-date information, see the linked official pages. The model built and the results produced by the AI must be checked by the responsible engineer.