Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

sliderPy - GetMapString doesn't work in PSSE34

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.

Python script:

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
  • Why can't I use "GetMapString" from sliderPy in PSSE34?
  • Is there a new updated command for this or is this a bug in PSSE 34?
  • If there is another way, how do I extract the Map String in PSSE 34?