Ask Your Question

mgb158's profile - activity

2014-11-09 19:31:54 -0500 received badge  Nice Answer (source)
2014-02-10 03:54:48 -0500 received badge  Teacher (source)
2014-02-10 03:54:48 -0500 received badge  Necromancer (source)
2014-02-09 05:41:49 -0500 answered a question DIgSILENT Powerfactory and Python scripts

I have used Python with PowerFactory, but only since the recently released Version 15.1.

You can run python scripts from within and outside PowerFactory. Outside you first get Python to start PowerFactory.

From within PowerFactory the scripts are quite straight forward. For example:

import powerfactory
app = powerfactory.GetApplication()
app.PrintPlain('Hello World')

Will write "Hello World' to the output box in PowerFactory. Running Python from the outside to run PowerFactory is a little more complicated, but not too bad.

PowerFactory's own language is called DLP. It is like C, but not quite. It can be a little restrictive. You are limited to its inbuilt data types which aren't particularly comprehensive.

Theoretically it can be interfaced with to outside PowerFactory, but this is limited - you cannot run DLLs that open dialog boxes.