First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
You need to invesigate the sliderPy module which is bundled with PSS/E.
import psspy
import sliderPy
doc = sliderPy.GetActiveDocument()
diag = doc.GetDiagram()
for c in diag.GetComponents():
pos = c.GetPosition()
compType = c.GetComponentType()
if compType == sliderPy.ComponentType.Symbol:
sym = c.SldSymbol()
symType = sym.GetSymbolType()
print '\nID:{0}: map:\'{4}\' type{1} X:{2} Y{3}'.format(c.GetID(), symType, pos.GetX(), pos.GetY(), c.GetMapString())