Back to blog

How to Automate ETABS Post-Processing using Python

how to automate ETABS post-processing·7 min read
Structures AI Team

Structures AI Team

Engineering

October 15, 2025

How to Automate ETABS Post-Processing using Python

The Ultimate Guide on How to Automate ETABS Post-Processing for Advanced Design Checks

Structural engineers spend countless hours manually extracting results from ETABS tables to perform detailed code compliance checks in external spreadsheets. This repetitive and error-prone process is a massive bottleneck, especially on complex high-rise projects. Did you know that manual data handling contributes to over 20% of design errors in large projects?

This guide details exactly how to automate ETABS post-processing using Python and the ETABS API. We will move beyond simple report generation and focus on automating the extraction of complex, filtered results necessary for critical design components like shear wall boundary elements and precise drift compliance. By the end of this tutorial, you will have the foundation to build robust, customized data pipelines for any ETABS model.

Why Automating ETABS Post-Processing is Essential for Productivity

In today's fast-paced AEC environment, manual post-processing is unsustainable. When dealing with dozens of load combinations, hundreds of shear wall piers, and thousands of drift checks, the risk of transposition errors is extremely high.

Automation provides immediate, measurable benefits:

  • Time Savings: Engineers can save an estimated 40% of their time typically spent on result extraction and formatting.
  • Error Reduction: Automation can reduce data transcription errors by up to 60%, ensuring compliance and safety.
  • Focus on Engineering: By offloading repetitive tasks, you can concentrate on higher-value engineering analysis and judgment.

Automating ETABS post-processing allows you to shift from merely running the analysis to instantaneously validating the results against complex internal standards or specific code requirements, increasing productivity by 2-3x.

Prerequisites and Setting Up the API Connection

To successfully implement these advanced automation techniques, you need a few key tools and prerequisites. This process relies heavily on the ETABS Application Programming Interface (API), which allows external programs like Python to interact directly with the running ETABS software.

Prerequisites:

  1. ETABS Installation: Ensure ETABS (version 2016 or newer is recommended) is installed and licensed.
  2. Python Installation: Python 3.8+ is ideal. We will use standard libraries like os and pandas.
  3. Understanding of COM: The ETABS API uses the Component Object Model (COM) interface. We will use the win32com.client library in Python to connect.

The first crucial step is establishing a reliable connection to the running ETABS instance.

import win32com.client import os # --- Step 1: Define Model Path and Connection --- model_path = r"C:\ETABS_Models\My_Highrise_Design.edb" # Check if ETABS is already running try: # Attempt to connect to an existing ETABS instance myETABSObject = win32com.client.GetActiveObject("CSI.ETABS.API.ETABSObject") print("Connected to running ETABS instance.") except: # If not running, create a new instance helper = win32com.client.Dispatch("ETABSv1.Helper") myETABSObject = helper.CreateObject("CSI.ETABS.API.ETABSObject") print("Starting new ETABS instance.") # Initialize the API model myModel = myETABSObject.SapModel # Open the specific model file if not myModel.File.OpenFile(model_path): print(f"Error: Could not open model file: {model_path}") exit() # Unlock the model if necessary (to run analysis) myModel.SetModelIsLocked(False) print("Model loaded successfully.")

Once connected, you have full programmatic access to the model, analysis results, and design parameters.

Step-by-Step Instructions: Automating Shear Wall Data Extraction

A common pain point in tall building design is calculating the required boundary element lengths for shear walls, which depends heavily on the maximum compressive stress and the neutral axis depth. This data must be extracted per load combination, filtered for max/min values, and formatted for external calculation.

Here is how to automate ETABS post-processing specifically for this detailed task:

1. Run Analysis and Select Target Results

Ensure the analysis has been successfully run (myModel.Analyze.RunAnalysis()). For shear wall boundary checks, we need the Pier Output Forces (P, M3, V2) and the corresponding section cuts.

2. Define Filters and Get Results

We instruct the API to retrieve the detailed Pier Force results. We will focus on extracting the axial force (P) for all piers under the required design combinations.

# Assuming the analysis is complete pier_name = "P-1A" load_case = "D+L+EQX" # Example specific load combination # Initialize the results container results = [] ret = myModel.Results.Setup.DeselectAllCasesAndCombosForOutput() ret = myModel.Results.Setup.SetCaseComboSelectedForOutput(load_case) # Get detailed pier force results [ret, NumberResults, Obj, Elm, LoadCase, StepType, StepNum, P, V2, V3, T, M2, M3] = \ myModel.Results.Concrete.GetPierForce(pier_name, 0, []) if ret == 0 and NumberResults > 0: for i in range(NumberResults): results.append({ 'Pier': pier_name, 'LoadCase': LoadCase[i], 'P_Force': P[i], 'M3_Moment': M3[i] # ... include other required data }) # Convert to DataFrame for easy filtering and export import pandas as pd df_pier_results = pd.DataFrame(results)

3. Filter and Export Critical Data

The power of automation lies in instant filtering. We can quickly identify the critical maximum and minimum P-forces (compression and tension) for all piers and export only the required data points.

# Filter for critical compression (Max P_Force, usually negative in ETABS) critical_compression = df_pier_results.loc[df_pier_results['P_Force'].idxmin()] print(f"\nCritical Compression Data for Pier {pier_name}:\n") print(critical_compression) # Export the entire dataset to a clean CSV file df_pier_results.to_csv("pier_force_extraction.csv", index=False)

This script bypasses manual searching through dozens of tables, providing only the relevant data points needed for the boundary element design calculation.

Advanced Automation: Drift Check Filtering

Another time-consuming task is ensuring story drift limits are met across all storeys and load combinations, especially when defining envelope limits based on ASCE 7 or local codes.

Leveraging the Power of Structures AI

While direct API coding offers granular control, many firms are turning to specialized tools to abstract the complexity of the ETABS API. Structures AI, the AI-Powered Automation for Structural Engineering platform, provides pre-built workflows for advanced post-processing tasks. Its key features, including ETABS Integration and AI-Powered Recommendations, allow engineers to define design criteria (e.g., drift limits, capacity ratios) and automatically validate models without writing hundreds of lines of Python code.

However, for those relying on custom scripting, the following code demonstrates how to efficiently filter drift results.

# --- Step 4: Automating Drift Checks --- drift_limit = 0.007 # Example: 0.7% drift limit # Get Story Drift results (requires the analysis to be run) [ret, NumberResults, Story, LoadCase, Direction, PDelta, Drift] = \ myModel.Results.Story.GetStoryDrift([], [], [], [], []) drift_data = [] if ret == 0 and NumberResults > 0: for i in range(NumberResults): drift_data.append({ 'Story': Story[i], 'LoadCase': LoadCase[i], 'Direction': Direction[i], 'DriftRatio': Drift[i] }) df_drift = pd.DataFrame(drift_data) # Filter for violations (where DriftRatio exceeds the defined limit) drift_violations = df_drift[df_drift['DriftRatio'].abs() > drift_limit] print(f"\n--- Drift Violations (Limit: {drift_limit}) ---") if not drift_violations.empty: print(drift_violations) drift_violations.to_csv("drift_violations_report.csv", index=False) else: print("No drift violations found based on the defined limit.")

By filtering the raw data using Pandas, we instantly generate a concise report of only the critical violations, drastically simplifying compliance review.

Common Pitfalls and Solutions

When learning how to automate ETABS post-processing, engineers often encounter specific challenges related to the API and data handling.

PitfallProblem DescriptionSolution
API InstabilityThe win32com connection occasionally drops or fails to initialize.Use robust try/except blocks (as shown in Step 1) and ensure ETABS is running with administrative privileges.
Handling EnvelopesAttempting to retrieve results based on user-defined design envelopes directly via the API.The API often requires looping through individual load combinations/cases and calculating the envelope maximums manually in Python/Pandas.
Units MismatchResults are extracted in inconsistent units (e.g., kips vs. kN).Always use the myModel.SetPresentUnits() command at the start of your script to force standard units before extracting data. Consult the official CSI documentation for unit mappings.
Massive DatasetsProcessing hundreds of thousands of story drift or frame results causes memory issues.Filter results early. Only request the specific elements or load cases required (e.g., use GetPierForce instead of GetAllPierForces).

For deeper technical guidance on specific API functions, refer to the official CSI ETABS API Documentation.

Conclusion

Mastering how to automate ETABS post-processing is no longer optional - it is a competitive necessity. By leveraging the power of Python and the ETABS API, you can transform hours of manual data extraction into seconds of script execution, saving 40% of design time and significantly reducing errors.

Start applying these techniques today to streamline your complex design checks, moving your focus from data management to structural innovation.

Ready to simplify your automation journey?

Download Structures AI for free and explore pre-built solutions for ETABS Integration and AI-Powered Automation for Structural Engineering.

Share this article

Email
X
Linkedin

San Francisco, CA