PowerFactory attribute reference

Every attribute name you can pass to GetAttribute and SetAttribute in DIgSILENT PowerFactory 2024, with units and meaning: 54 element classes, 11 types and 8 simulation events, 41,231 names in all.

The attribute names people look up most

You wantAttributeUnitClassAfter
Loading of a line or transformerc:loading%ElmLne, ElmTr2, ElmTr3, ElmSymLoad flow
Busbar voltage, per unitm:up.u.ElmTermLoad flow
Busbar voltage, line-linem:UlkVElmTermLoad flow
Voltage anglem:phiudegElmTermLoad flow
Active power at a line endm:P:bus1MWElmLne (ElmTr2: m:P:bushv, m:P:buslv)Load flow
Reactive power at a line endm:Q:bus1MvarElmLne, ElmSym, ElmLod...Load flow
Current at a line endm:I:bus1kAElmLneLoad flow
Lossesc:PlossMWElmLne, ElmTr2Load flow
Generator dispatch (input)pginiMWElmSym, ElmGenstat (ElmPvsys in kW)Input data
Load demand (input)plini, qliniMW, MvarElmLodInput data
Out of serviceoutserv1 or 0every elementInput data
Breaker open or closedon_off1 closed, 0 openElmCoupInput data
Tap positionnntap·ElmTr2Input data
Line lengthdlinekmElmLneInput data
Initial short-circuit currentm:IksskAElmTermShort circuit
Initial short-circuit powerm:SkssMVAElmTermShort circuit
Peak short-circuit currentm:ipkAElmTermShort circuit
Frequencym:fehzHzElmTermRMS simulation
Rotor anglec:fireldegElmSymRMS simulation
Speeds:speedp.u.ElmSymRMS simulation

Results (m:, c:, n:) exist only after the calculation named in the last column has run in the active study case.

What the prefix of an attribute name means

e:
Input parameter: the data of the element. Optional when you type it: GetAttribute("dline") and GetAttribute("e:dline") are the same.
m:
Currents, voltages and powers. On a branch it names the terminal: m:P:bus1, m:P:bushv. Without it, m:P on a line raises AttributeError.
c:
Calculation parameter: a result worked out from the others, such as c:loading and c:Ploss.
n:
Bus result: the result of the terminal at one end of a branch, such as n:u:bus1.
s:
Signal: a state or model variable of an RMS or EMT simulation, such as s:speed.
b:
Basic data: values derived from the input data (read only).
t:
Type parameter read through the element: line.GetAttribute("t:uline") is the rated voltage of the line's type.
:A :B :C
Per phase, in an unbalanced calculation only: m:u:A, m:I:bus1:A (capitals; :a raises AttributeError).

Each rule above was checked on the PowerFactory 2024 engine. A name a class does not have raises AttributeError.

Read and write any attribute

import powerfactory

app = powerfactory.GetApplication()          # inside PowerFactory; GetApplicationExt() from your own Python
app.GetFromStudyCase("ComLdf").Execute()      # results need a calculation first

for line in app.GetCalcRelevantObjects("*.ElmLne"):
    print(line.loc_name, line.GetAttribute("c:loading"), line.GetAttribute("m:P:bus1"))

for bus in app.GetCalcRelevantObjects("*.ElmTerm"):
    print(bus.loc_name, bus.GetAttribute("m:u"))

load = app.GetCalcRelevantObjects("*.ElmLod")[0]
load.SetAttribute("plini", 140.0)             # input data: the next load flow uses it

New to the API? Start with the PowerFactory Python API guide, or see every study you can automate.

Lines, cables and transformers

Terminals and switching

Generators and sources

Loads and compensation

Power electronics and HVDC

Dynamic models, control and protection

Grids, areas and other groupings

Results and measurement data

Types (shared equipment data)

Simulation events