In Mechanical scripting, how can I get the current solver directory (dpXX/SYS/Mech)?
Landon Mitchell Kanner
Member, Employee, GitHub-issue-creator Posts: 319
✭✭✭✭
I am using Mechanical scripting and would like to get the path to the solver directory for a given analysis. I want to know the location that is opened if I right click on the analysis branch and click 'Open Solver Files Directory".
Tagged:
0
Best Answer
-
For demo purposes let's get the working directory for the first analysis:
first_analysis = ExtAPI.DataModel.Project.Model.Analyses[0] solver_directory = first_analysis.WorkingDir
Note: During solution the solver directory will change to a temporary directory.
1
Answers
-
@Landon Mitchell Kanner, perfect! Thank you for this snippet. And also for refering this forum to me :)
0