Hi All,
I am working with Civil engineer to automate some model analysis for him using Python. However, I don't know how to import his tcl files into Python.
I googled here and there and couldn't find anything relevant.
Please let me know your comments.
Is there anyway to load tcl file into OpenSeesPy model?
Moderators: silvia, selimgunay, Moderators
-
- Posts: 24
- Joined: Sat Aug 21, 2021 9:19 pm
Re: Is there anyway to load tcl file into OpenSeesPy model?
This script does basic conversions of OpenSees Tcl to OpenSees Python. It assumes the input is line by line and there are no variables or constructs like loops or if statements. The script is not perfect, but it'll get you most of the way there.
https://github.com/OpenSees/OpenSees/bl ... nSeesPy.py
https://github.com/OpenSees/OpenSees/bl ... nSeesPy.py
-
- Posts: 24
- Joined: Sat Aug 21, 2021 9:19 pm
Re: Is there anyway to load tcl file into OpenSeesPy model?
This one was the best approach so far ... I wish there was a Python driver for OpenSees.exe to pass commands using PIPE and retrieve the results from output pipe.mhscott wrote: ↑Sun Aug 22, 2021 7:15 am This might be useful too: https://portwooddigital.com/2021/06/20/ ... or-python/
This way I could use python to drive OpenSees analysis and I didn't have to convert all the tcl files to OpenSeesPy or O3SeesPy.
Anyway thanks for the response!
Re: Is there anyway to load tcl file into OpenSeesPy model?
Good to hear. When you develop something, please share with the OpenSees community.