First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
I want to extract line data (From Bus, To Bus and ID) in a Python script after selecting a line in the SLD and then running the script. It works as intended in PSSE 33 but not in PSSE 34. I am using sliderPy and GetMapString, se script below.
import sliderPy
mydoc = sliderPy.GetActiveDocument()
mydiagram = mydoc.GetDiagram()
mycomponents = mydiagram.GetComponents()
for mycomponent in mycomponents:
if mycomponent.IsSelected() == True:
try:
print 'Type: {0}'.format(mycomponent.GetComponentType())
print 'MapString: {0}'.format(mycomponent.GetMapString())
except:
pass
For example, lets use savnw.sav and savnw.sld in both PSSE 33 and PSSE 34. When selecting the line between bus 3006 and bus 153 the result will be as follows:
In PSSE 33:
Type: Link
MapString: LI 153 3006 1
In PSSE 34 (klicking the mid point):
Type: Symbol
In PSSE 34 (Klicking on the line next to the mid point):
Type: Symbol
Type: Link
MapString:
Do observe that if you right click on the line in the SLD and select "item Properties -> Map String..." you can see that the Map String is shown as intended in PSSE 34:
LII 153 3006 1