Search code examples
pycharmjmodelica

Running JModelica in PyCharm - running a .bat file before the PyCharm interpreter to setup the environment


I do most of my development work in PyCharm and would like to do the same with JModelica. I understand that the setenv.bat needs to be run before the interpreter is opened, so that the interpreter knows where to locate the JModelica Python Libraries such as pymodelica. See this related post. But how can this be achieved within PyCharm?


Solution

  • you can create a startPyCharm.bat e.g.

    call C:\JModelica.org-SDK-1.12\setenv.bat
    start C:\....\pycharm.exe
    

    (similarly to C:\JModelica.org-SDK-1.12\Python.bat)