# ebrahimraeyat/etabs_api architecture

> Architecture diagram of the GitHub repository ebrahimraeyat/etabs_api, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ebrahimraeyat/etabs_api
- Repository: https://github.com/ebrahimraeyat/etabs_api

## Overview

etabs_api is a Python interface and engineering-automation toolkit for CSI ETABS and SAFE. Its main workflow is to connect to an open ETABS model, configure or inspect structural model data, run analysis and retrieve results, then support design calculations and exports. The graph preserves the documented table read/write workflow and major structural domains represented in the source index. Arrows are limited to relationships directly shown by README or sampled source references; unsampled capabilities are represented without speculative connections.

Main entry points: [`etabs_obj.py`](https://github.com/ebrahimraeyat/etabs_api/blob/master/etabs_obj.py) (ETABS facade), [`database.py`](https://github.com/ebrahimraeyat/etabs_api/blob/master/database.py) (Table access), [`frame_obj.py`](https://github.com/ebrahimraeyat/etabs_api/blob/master/frame_obj.py) (Frame objects), [`etabs_api_export/export_plans_to_dxf.py`](https://github.com/ebrahimraeyat/etabs_api/blob/master/etabs_api_export/export_plans_to_dxf.py) (Plan DXF export)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_connection["Connection and model"]
  node_connect["Attach to ETABS<br/>[find_etabs.py]"]
  node_model_api["ETABS facade<br/>[etabs_obj.py]"]
  node_table_api["Table access<br/>[database.py]"]
  node_safe_file["SAFE file tools<br/>[safe.py]"]
  node_f2k_builder["F2K creation<br/>[create_f2k.py]"]
end

subgraph group_engineering["Structural model"]
  node_loads["Loads and cases<br/>[load_patterns.py]"]
  node_load_cases["Load case management<br/>[load_cases.py]"]
  node_combinations["Load combinations"]
  node_geometry["Area objects<br/>[area.py]"]
  node_frames["Frame objects<br/>[frame_obj.py]"]
  node_points["Point objects<br/>[points.py]"]
  node_materials["Materials<br/>[material.py]"]
  node_sections["Frame sections<br/>[prop_frame.py]"]
  node_stories["Story levels<br/>[story.py]"]
  node_diaphragm["Diaphragms<br/>[diaphragm.py]"]
end

subgraph group_analysis["Analysis and design"]
  node_analysis_control["Analysis control<br/>[analyze.py]"]
  node_results["Analysis results<br/>[results.py]"]
  node_design["Structural design<br/>[design.py]"]
  node_optimization["Model optimization"]
end

subgraph group_outputs["Engineering outputs"]
  node_report["Engineering reports<br/>[all_report.py]"]
  node_dxf["Plan DXF export"]
  node_freecad["FreeCAD utilities<br/>[freecad_funcs.py]"]
  node_helpers["Engineering helpers"]
end

node_engineer(("Engineer"))
node_etabs{{"CSI ETABS"}}
node_safe_service{{"CSI SAFE"}}
node_database_store[("ETABS model tables")]

node_engineer -->|"connects"| node_connect
node_connect -->|"returns facade"| node_model_api
node_model_api -->|"controls"| node_etabs
node_engineer -->|"reads and writes"| node_table_api
node_table_api -->|"reads and writes"| node_database_store
node_model_api -->|"exposes"| node_table_api
node_model_api -->|"exposes"| node_loads
node_model_api -->|"exposes"| node_load_cases
node_model_api -->|"exposes"| node_combinations
node_model_api -->|"exposes"| node_stories
node_model_api -->|"exposes"| node_frames
node_model_api -->|"exposes"| node_points
node_model_api -->|"exposes"| node_materials
node_model_api -->|"exposes"| node_geometry
node_model_api -->|"exposes"| node_design
node_model_api -->|"exposes"| node_results
node_model_api -->|"calls"| node_analysis_control
node_model_api -->|"used by"| node_optimization
node_f2k_builder -->|"builds input for"| node_safe_file
node_safe_file -.->|"formats files for"| node_safe_service
node_table_api -.->|"accesses tables"| node_etabs
node_design -->|"uses"| node_helpers
node_frames -->|"uses"| node_helpers
node_dxf -->|"queries geometry"| node_frames
node_dxf -->|"queries levels"| node_stories
node_report -->|"uses utilities"| node_freecad

click node_connect "https://github.com/ebrahimraeyat/etabs_api/blob/master/find_etabs.py"
click node_model_api "https://github.com/ebrahimraeyat/etabs_api/blob/master/etabs_obj.py"
click node_table_api "https://github.com/ebrahimraeyat/etabs_api/blob/master/database.py"
click node_safe_file "https://github.com/ebrahimraeyat/etabs_api/blob/master/csi_safe/safe.py"
click node_f2k_builder "https://github.com/ebrahimraeyat/etabs_api/blob/master/create_f2k.py"
click node_loads "https://github.com/ebrahimraeyat/etabs_api/blob/master/load_patterns.py"
click node_load_cases "https://github.com/ebrahimraeyat/etabs_api/blob/master/load_cases.py"
click node_combinations "https://github.com/ebrahimraeyat/etabs_api/blob/master/load_combinations.py"
click node_geometry "https://github.com/ebrahimraeyat/etabs_api/blob/master/area.py"
click node_frames "https://github.com/ebrahimraeyat/etabs_api/blob/master/frame_obj.py"
click node_points "https://github.com/ebrahimraeyat/etabs_api/blob/master/points.py"
click node_materials "https://github.com/ebrahimraeyat/etabs_api/blob/master/material.py"
click node_sections "https://github.com/ebrahimraeyat/etabs_api/blob/master/prop_frame.py"
click node_stories "https://github.com/ebrahimraeyat/etabs_api/blob/master/story.py"
click node_diaphragm "https://github.com/ebrahimraeyat/etabs_api/blob/master/diaphragm.py"
click node_analysis_control "https://github.com/ebrahimraeyat/etabs_api/blob/master/analyze.py"
click node_results "https://github.com/ebrahimraeyat/etabs_api/blob/master/results.py"
click node_design "https://github.com/ebrahimraeyat/etabs_api/blob/master/design.py"
click node_optimization "https://github.com/ebrahimraeyat/etabs_api/blob/master/run_optimization.py"
click node_report "https://github.com/ebrahimraeyat/etabs_api/blob/master/report/all_report.py"
click node_dxf "https://github.com/ebrahimraeyat/etabs_api/blob/master/etabs_api_export/export_plans_to_dxf.py"
click node_freecad "https://github.com/ebrahimraeyat/etabs_api/blob/master/freecad_funcs.py"
click node_helpers "https://github.com/ebrahimraeyat/etabs_api/blob/master/python_functions.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_connect,node_model_api,node_table_api,node_safe_file,node_f2k_builder toneBlue
class node_loads,node_load_cases,node_combinations,node_geometry,node_frames,node_points,node_materials,node_sections,node_stories,node_diaphragm,node_database_store toneAmber
class node_analysis_control,node_results,node_design,node_optimization toneMint
class node_report,node_dxf,node_freecad,node_helpers toneRose
class node_engineer,node_etabs,node_safe_service toneIndigo
```

## Components

### Connection and model

- [Attach to ETABS](https://github.com/ebrahimraeyat/etabs_api/blob/master/find_etabs.py): `find_etabs.py`
- [ETABS facade](https://github.com/ebrahimraeyat/etabs_api/blob/master/etabs_obj.py): `etabs_obj.py`
- [Table access](https://github.com/ebrahimraeyat/etabs_api/blob/master/database.py): `database.py`
- [SAFE file tools](https://github.com/ebrahimraeyat/etabs_api/blob/master/csi_safe/safe.py): `csi_safe/safe.py`
- [F2K creation](https://github.com/ebrahimraeyat/etabs_api/blob/master/create_f2k.py): `create_f2k.py`

### Structural model

- [Loads and cases](https://github.com/ebrahimraeyat/etabs_api/blob/master/load_patterns.py): `load_patterns.py`
- [Load case management](https://github.com/ebrahimraeyat/etabs_api/blob/master/load_cases.py): `load_cases.py`
- [Load combinations](https://github.com/ebrahimraeyat/etabs_api/blob/master/load_combinations.py): `load_combinations.py`
- [Area objects](https://github.com/ebrahimraeyat/etabs_api/blob/master/area.py): `area.py`
- [Frame objects](https://github.com/ebrahimraeyat/etabs_api/blob/master/frame_obj.py): `frame_obj.py`
- [Point objects](https://github.com/ebrahimraeyat/etabs_api/blob/master/points.py): `points.py`
- [Materials](https://github.com/ebrahimraeyat/etabs_api/blob/master/material.py): `material.py`
- [Frame sections](https://github.com/ebrahimraeyat/etabs_api/blob/master/prop_frame.py): `prop_frame.py`
- [Story levels](https://github.com/ebrahimraeyat/etabs_api/blob/master/story.py): `story.py`
- [Diaphragms](https://github.com/ebrahimraeyat/etabs_api/blob/master/diaphragm.py): `diaphragm.py`

### Analysis and design

- [Analysis control](https://github.com/ebrahimraeyat/etabs_api/blob/master/analyze.py): `analyze.py`
- [Analysis results](https://github.com/ebrahimraeyat/etabs_api/blob/master/results.py): `results.py`
- [Structural design](https://github.com/ebrahimraeyat/etabs_api/blob/master/design.py): `design.py`
- [Model optimization](https://github.com/ebrahimraeyat/etabs_api/blob/master/run_optimization.py): `run_optimization.py`

### Engineering outputs

- [Engineering reports](https://github.com/ebrahimraeyat/etabs_api/blob/master/report/all_report.py): `report/all_report.py`
- [Plan DXF export](https://github.com/ebrahimraeyat/etabs_api/blob/master/etabs_api_export/export_plans_to_dxf.py): `etabs_api_export/export_plans_to_dxf.py`
- [FreeCAD utilities](https://github.com/ebrahimraeyat/etabs_api/blob/master/freecad_funcs.py): `freecad_funcs.py`
- [Engineering helpers](https://github.com/ebrahimraeyat/etabs_api/blob/master/python_functions.py): `python_functions.py`

### Other components

- **Engineer**
- **CSI ETABS**
- **CSI SAFE**
- **ETABS model tables**

## Connections

- Engineer → Attach to ETABS: connects (evidence: `README.md`)
- Attach to ETABS → ETABS facade: returns facade (evidence: `find_etabs.py`)
- ETABS facade → CSI ETABS: controls (evidence: `etabs_obj.py`)
- Engineer → Table access: reads and writes (evidence: `README.md`)
- Table access → ETABS model tables: reads and writes (evidence: `README.md`)
- ETABS facade → Table access: exposes (evidence: `etabs_obj.py`)
- ETABS facade → Loads and cases: exposes (evidence: `etabs_obj.py`)
- ETABS facade → Load case management: exposes (evidence: `etabs_obj.py`)
- ETABS facade → Load combinations: exposes (evidence: `etabs_obj.py`)
- ETABS facade → Story levels: exposes (evidence: `etabs_obj.py`)
- ETABS facade → Frame objects: exposes (evidence: `etabs_obj.py`)
- ETABS facade → Point objects: exposes (evidence: `etabs_obj.py`)
- ETABS facade → Materials: exposes (evidence: `etabs_obj.py`)
- ETABS facade → Area objects: exposes (evidence: `etabs_obj.py`)
- ETABS facade → Structural design: exposes (evidence: `etabs_obj.py`)
- ETABS facade → Analysis results: exposes (evidence: `etabs_obj.py`)
- ETABS facade → Analysis control: calls (evidence: `etabs_obj.py`)
- ETABS facade → Model optimization: used by (evidence: `run_optimization.py`)
- F2K creation → SAFE file tools: builds input for (evidence: `create_f2k.py`)
- SAFE file tools → CSI SAFE: formats files for (evidence: `README.md`)
- Table access → CSI ETABS: accesses tables (evidence: `README.md`)
- Structural design → Engineering helpers: uses (evidence: `design.py`)
- Frame objects → Engineering helpers: uses (evidence: `frame_obj.py`)
- Plan DXF export → Frame objects: queries geometry (evidence: `etabs_api_export/export_plans_to_dxf.py`)
- Plan DXF export → Story levels: queries levels (evidence: `etabs_api_export/export_plans_to_dxf.py`)
- Engineering reports → FreeCAD utilities: uses utilities (evidence: `report/all_report.py`)
