How can I exit powerfactory using Python in Unattended mode?

心已入冬 提交于 2019-12-13 07:22:50

问题


I am new to Python scripting and I am currently trying to get acquainted with python scripting and DigSILENT Powerfactory.

I have managed thus far to execute powerfactory, activate projects and execute a load flow but after my code ends, when I try to rerun it, it wont run. In order for it to run I need to close Spyder and reopen it. I believe this is related to the fact that powerfactory is still running in the background so I was wondering if there is any command that "forces" powerfactory to shut down after the code execution.

Any tip would be greatly appreciated :)


回答1:


I had the same problem. But faster than shutdown/reopen spyder is to restart the kernel with ctrl + .




回答2:


you could try this:

app.PostCommand("exit")



来源:https://stackoverflow.com/questions/42582399/how-can-i-exit-powerfactory-using-python-in-unattended-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!