0

Remove all unbound items from slider diagram

I equivalenced low voltage busses and I want to clean up all the unbound (pink) items from the slider diagram, without clicking and deleting each one individually. I don't see any functions listed in API or in sliderPy module, where else could I look?

Ascegan's avatar
11
Ascegan
asked 2020-04-17 07:51:38 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

Removing them all is actually a bit more complicated than you thought. I have done it before based on map strings, which since then Siemens has changed the API (the old method getting map string is now returning a byte encoded sequence that needs to be decoded, and Siemens has not told us how to do it), so my method only works in v33.4 (or lower).

The module you need is the 'sliderPy', and you must run the script in the PSSE GUI.

The idea is to firstly get all the map strings of the pink elements. Note that they must be in the SAV previously, newly added pink elements do not have map strings.

After getting all the wanted map strings, which you need use the 'checkdiafile' from 'psspy' with the output directed to a file and do some search and replace, use the 'sliderPy.GetActiveDocument()' to get the SLD file, then use the 'GetDiagram()' method of the file object to get the actual SLD.

Then, find the diagram objects using the map strings.

After that, use the 'DeleteComponent(obj.GetID())' in a loop to remove the pink elements.

I remember that the 'sliderPy' has no official documentation. You will need to get the docstring out of this module and read it very carefully. I believe this module is actually a C++ ported to Python, so it is very unfriendly to read.

I am not gonna post any code for this since it is a lot of work and actually not that interesting and it is hugely version dependent. Siemens surely can include this feature or just make PSSE proper and decent.

drsgao's avatar
76
drsgao
answered 2020-04-17 11:01:25 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Login/Signup to Answer