General Mechanical

General Mechanical

Topics relate to Mechanical Enterprise, Motion, Additive Print and more

Solve command not working in Discovery Scripting

    • Karan Bhuta
      Subscriber

      I want to run a simple simulation using discovery scripting. I started recording and ran my simulation and it ran successful but when I try to use the code generated by it, that code fails to run throwing error stating, "The type initializer for 'Ansys.Discovery.Api.V23.Solution.Solver' threw an exception."

    • Devendra Badgujar
      Forum Moderator

      Hello Karan, 

      I tried the code generated after running this simulation and was able to use it without any problem.

      Can you please share an image of the script and error message that you are getting after running the script? Also, can you please provide specific steps to reproduce this at our end? 

      Regards,

      Devendra 

    • Karan Bhuta
      Subscriber

      Hi Devendra,

      This is what it looks like when i try to run it. I have used indexing variables isntead of smart variables. Even without the fidelity adjustments, it used to throw the same error.

       

      Thank you,

      Karan Bhuta

    • Devendra Badgujar
      Forum Moderator

      Hi Karan, 

      Are you able to solve in Refine mode without script, this looks problem with solving in refine mode. Can you please try running the bracket sample case in Refine mode and see if that runs. 

      I tried the same at my end and was able to run the script:

      Regards,

      Devendra 

Viewing 3 reply threads
  • The topic ‘Solve command not working in Discovery Scripting’ is closed to new replies.