Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ansys ACT Mechanical - running .py file

Status
Not open for further replies.

L_K

Structural
Sep 22, 2016
267
How to run a python script file in ACT console?
 
Replies continue below

Recommended for you

Thanks. Do you know how to run an external py file from console. For example I have file "test.py" in the working folder which I would want to run?

The reason is that I would like to use for example notepad++ to develop a snippet (usually requires lots of testing and mistakes) and avoid copy pasting to console all the time.




 
Solution is the following:

exec(script), where script is a string of the contents of the file.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor