如何在无人值守模式下使用 Python 退出 powerfactory? [英] How can I exit powerfactory using Python in Unattended mode?

查看:63
本文介绍了如何在无人值守模式下使用 Python 退出 powerfactory?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Python 脚本的新手,我目前正在尝试熟悉 Python 脚本和 DigSILENT Powerfactory.

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

到目前为止,我已经设法执行 powerfactory、激活项目和执行负载流,但是在我的代码结束后,当我尝试重新运行它时,它不会运行.为了让它运行,我需要关闭 Spyder 并重新打开它.我相信这与 powerfactory 仍在后台运行的事实有关,所以我想知道是否有任何命令可以在代码执行后强制"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 :)

推荐答案

你可以试试这个:

app.PostCommand("退出")

app.PostCommand("exit")

这篇关于如何在无人值守模式下使用 Python 退出 powerfactory?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆