TAGGED: ansys-cfx, command-line, command-line-interface, workbench
-
-
October 3, 2023 at 4:10 pmJett22Subscriber
Hi everyone,
I am trying to start a python script in ANSYS Workbench from Windows Command Prompt. This script has python commands which has an automation scheme in it. I am having slight issues with how to do this. Once in Workbench I do: File-->Scripting-->Run Script File...-->(change the file type to python)-->(then select my automation python script) Can someone please explain how to do this?
So far I am entering this into cmd: “C:\Program Files\ANSYS Inc\v231\Framework\bin\Win64\RunWB2.exe” -r "C:\Users\jett\Desktop\ANSYStest1\BasicV2\WorkingProject.py"
I am getting a fatal error. Is there a more specific way to do this?
Thanks in advance -
October 4, 2023 at 9:06 amAniketForum Moderator
C:\Program Files\ANSYS Inc\V231\Framework\bin\win64\runwb2 -R workbenchscriptfile -I should be the way of doing it if you want to your script interactively from the command prompt.
https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v232/en/wb2_js/wb2js_cmdlineexec.html
Does the workingproject.py script work when you run it from file>scripting>Run script file? If yes, try checking the file path for the script and see if the autocompletion feature helps to navigate to the correct path.
-Aniket
-
October 4, 2023 at 9:53 amErik KostsonAnsys Employee
Duplicate discussion- use the other discussion as it is related to cfx.
/forum/forums/topic/running-journal-python-file-form-the-command-line-ansys-cfx/#post-309990
Closing here (please do not create multiple discussions of the same topic)
Erik
-
- The topic ‘ANSYS command line – running python script’ is closed to new replies.
- At least one body has been found to have only 1 element in at least 2 directions
- Error when opening saved Workbench project
- How to apply Compression-only Support?
- Geometric stiffness matrix for solid elements
- Frictional No separation contact
- Timestep range set for animation export
- Image to file in Mechanical is bugged and does not show text
- Script Error Code:800a000d
- Elastic limit load, Elastic-plastic limit load
- Element has excessive thickness change, distortion, is turning inside out
-
1406
-
599
-
591
-
555
-
366
© 2025 Copyright ANSYS, Inc. All rights reserved.