x

Version 3.0.3 (Released at 05/31/2020)
- Bug in setelem command is fixed.
- Some minor bugs are fixed in the help manual.


Python control(Read 31 times)
Python control on: May 14, 2020, 12:57:18 pm
Is there any possibility to use ADONIS in combination with a Python? Ideally there was a possibility to control ADONIS directly from a Python script via an API.

Thank you all and great program!



Re: Python control Reply #1 on: May 14, 2020, 01:46:54 pm
Hi

unfortunately there is no direct way to control the program using Python, selected language here is javascript but one thing you can do is to create the script using python and then call ADONIS to execute the generated script.

FYI, I was working on releasing a non-gui version of the program which allow easier control via third programs such as python or matlab. unfortunately I got sidetracked by other projects but at some point I might come back to that.

-Roozbeh



Re: Python control Reply #2 on: May 22, 2020, 01:06:15 pm
Hello Roozbeh,

thank you for your answer and I ended up with a solution where my .ajs script is automatically generated in a Python code from which I am also controlling ADONIS via simulating mouse and keyboard movements. Not high-performance, but it allows to test a lot of parameter combinations in short time.

Cheers!



Re: Python control Reply #3 on: May 22, 2020, 01:40:07 pm
good to hear,

javascript is very powerful as well. you can simply use for-loop in the script to test different parameter combination. basically what ever you want to do in python is doable with javascript unless you are using complex third party library. javascript should be sufficient for the most of geotechnical problems.

the detail about the javascript syntax can be found in here: https://www.w3schools.com/js/js_es5.asp

later on I might have to release couple of tutorials about taking advantage of scripting language in ADONIS. if you think there might be some cool problems that can be explored please let me know.

-Roozbeh