Sparked by a reddit inquiry, I have added an example on my github to access the database table results using the ETABs API. The python code can be found on github.

The Code

The example code works to access the joint reaction database table results from ETABs v20.


In the image above, you can see that the python code pulls the correct vertical reaction when looking at the dead load reaction (3.177 kips). The python code returns results in pounds, but you can easily format your result units with SapModel.SetPresentUnits(x). The ETABs API document gives a good run down on all the units available.

ETABs Python

Your sharing is good. But I have an error when running the scripts. It happens when it tries to 

"show all the available tables that can be accessed". I mean at this line:

x = SapModel.DatabaseTables.GetAvailableTables(NumberTables,TableKey, TableName, ImportType)

I also installed "comtype,clients". Please help figure out my issue, thank you.

Traceback (most recent call last):
  File "D:\WORK\myPython\myapp\venv\lib\site-packages\comtypes\", line 274, in __getattr__
    fixed_name = self.__map_case__[name.lower()]
KeyError: 'databasetables'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\WORK\myPython\EtabsApi\try\", line 24, in <module>
    x = SapModel.DatabaseTables.GetAvailableTables(NumberTables,TableKey, TableName, ImportType)
  File "D:\WORK\myPython\myapp\venv\lib\site-packages\comtypes\", line 276, in __getattr__
    raise AttributeError(name)
AttributeError: DatabaseTables

@Khatran, what version of ETABs are you running?

Do the lines of code before x = SapModel.DatabaseTables.GetAvailableTables(...) work?


Thank you for your reply, I am using Etabs 18.0.2. But the code runs well on another PC with Etabs 18.1.1

I have tried to uninstall and reinstall the comptypes.cilent but it still does not work.

I love making some small desktop app by using Etabs-Api, and your sharing helps me much. Thank again

Thank you, I have created an Etasb-Plugin, for Normalized Axial Force checking under seismic according to Eurocode. I want to share it with you if you wish. smiley

Khatran, that looks like a great program! Is that graphical user interface made with python or is that a C# addin for ETABs? I want to explore making an addin with buttons natively in ETABs.

Throw the code up on github if you would like to share and drop a link in the comments, it would be great to see how you coded this up.


I wrote by (also possible by C# or python), then debug to a .dll file to use as Etabs plugin. I do not have GitHub account, but I could send it to you by email if you want to. 

I also have some tools to define multi-framing sections, materials, load patterns, and load combinations.... automatically (I have posted some videos on my channel). Even we could run it by VBA.

Hi, this is my new app for exporting column/wall to Prokon for design.

Our Sidebar

You can put any information here you'd like.

  • Latest Comments
  • retug on Diaphragm Slicer New and Improved -

    Thanks Trenno.

    I will work to get metric units incorporated, that's a great idea.

    On your second point, I think something like that could be done, it's just a bit awkward with how CSI currently has it setup. In order to make section cuts, I need to unlock the model, ...

  • Trenno on Diaphragm Slicer New and Improved -

    Awesome work S&T!

    Firstly, I'd recommend if you're going to feature the tool on CSI's website then maybe incorporate metric units (aka real units!) 

    Secondly, I'm wondering if there would be a way to set up the workflow using something akin to RAM Concept design strips. Perhaps the strip width ...

  • e95kwon on Transfer Diaphragm Design -

    My understanding is that for a 5-story building you would have:

    • (1) load case A (ELF)
    • (1) load case B for each level except the roof so total (4)
    • therefore (4) load combos for diaphragm design

    I believe the intent is to envelope higher mode actions as you mentioned ...