Nov-19-2022, 12:09 PM
Two or so years ago I wrote a Python Program for ANSYS scripting that had the following code snippet in it:
This bit of code opened up a smallish directory window that let me se the current directory or navigate to other directories to select a file. In my case I am simply reading in a .csv file. I think the window may have been a reduced size file manager.
It was useful because it remembered the file I selected the next time I accessed so I didn't have to type long filenames.
I cannot find a ScriptEnv module, so the IDE ignores the import and complains that ScriptEnv does not exist.
Is there some other way to implement this capability? I am now using Python 3.8.1. Its possibly that I was using Iron Python previously. This was pretty handy in the other program when I was using it heavily.
Thanks - Jim
import ScriptEnv ScriptEnv.Initialize("Ansoft.ElectronicsDesktop") ..... infile = open(ScriptArgument,"r") ......I am now using pyaedt to generate structures and automate EDT 2022.2
This bit of code opened up a smallish directory window that let me se the current directory or navigate to other directories to select a file. In my case I am simply reading in a .csv file. I think the window may have been a reduced size file manager.
It was useful because it remembered the file I selected the next time I accessed so I didn't have to type long filenames.
I cannot find a ScriptEnv module, so the IDE ignores the import and complains that ScriptEnv does not exist.
Is there some other way to implement this capability? I am now using Python 3.8.1. Its possibly that I was using Iron Python previously. This was pretty handy in the other program when I was using it heavily.
Thanks - Jim