TAGGED: ansys-mechanical, python-scripting
-
-
June 29, 2022 at 4:12 pm
K Kramer
SubscriberI would like to automate my Mechanical simulation (including the solution process) via a Python script. However, if I type
Model.Analyses[0].Solution.Solve(True)
in my script (this command can be found in the official scripting help under https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v221/en/act_script/act_script_examples_solve_track_core.html), I get an error reading "Unable to get working directory". Typing the same command in the shell works fine. Does anyone know a fix? This problem is very annoying since it forces me to always run the analysis manually. -
July 5, 2022 at 12:35 pm
Aniket Chavan
Forum Moderator- which version are you using? I am assuming it is 2022R1
- can you please add a screenshot of your mechanical window and where you are typing this in?
-Aniket
-
August 13, 2022 at 7:53 am
-
August 30, 2022 at 4:25 pm
Aniket Chavan
Forum ModeratorI am sorry but don't see any error in the shell... and what is the variable "defomationsavepath"?
-Aniket
-
- The topic ‘“Unable to get working directory” error when using Solve() in script’ is closed to new replies.
-
5824
-
1906
-
1420
-
1305
-
1021
© 2026 Copyright ANSYS, Inc. All rights reserved.
