General Mechanical

General Mechanical

“Unable to get working directory” error when using Solve() in script

    • kramer
      Subscriber

      I 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.

    • Aniket
      Ansys Employee
      1. which version are you using? I am assuming it is 2022R1
      2. can you please add a screenshot of your mechanical window and where you are typing this in?

      -Aniket

    • kramer
      Subscriber
      1. 2022R1 is correct.
      2. See screenshot

    • Aniket
      Ansys Employee

      I am sorry but don't see any error in the shell... and what is the variable "defomationsavepath"?

      -Aniket

      How to access Ansys help links

      Guidelines for Posting on Ansys Learning Forum

Viewing 3 reply threads
  • You must be logged in to reply to this topic.