Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

ETABS API & Python - Cannot Attach to Existing Instance

Status
Not open for further replies.

Bjorn_Steinhagen

Structural
May 22, 2019
10
Hi All,

Been trying to work with the ETABS API through Python. Majority of work will be done on existing ETABS models therefore trying to connect to existing instances of an ETABS model. When just trying to attach to a running instance of ETABS through Python I get the error:

AttributeError: module 'comtypes.gen.ETABSv17' has no attribute 'cOAPI'

This is strange as my colleague ran the exact same script on his PC and all worked fine and he could successfully work on ETABS models. Could anyone provide any insight on getting this to work? I have installed comtypes library.

Any help would be greatly appreciated.

Find Python script attached (straight copy and paste from the .chm help file).

Thanks!

 
 https://files.engineering.com/getfile.aspx?folder=9a3373b0-0303-4f15-a827-01a6970c7dee&file=ETABS_connect.py
Replies continue below

Recommended for you

Thanks for the response! I still cannot seem to get things to work, could you kindly explain what you had to change in the init file? And why (just for my understanding). Thanks!
 
Won't comment on script itself since I'm no expert there. But you may want to consider bumping to ETABS v18. We've recently been developing some ETABS tools with Python and ETABS v17 was having some huge troubles with a lot of things. We bumped up to v18 and things are much smoother.

They made some big API improvements between v17 and v18.
 
I have gotten the API to work and already run into some shortcomings in terms of what can be scripted ... thanks for sharing the update regarding v18, I look forward to upgrading and checking it out!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor