Ask Your Question
0

Remove all unbound items from slider diagram

asked 2020-04-17 07:51:38 -0500

Ascegan gravatar image

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?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-04-17 11:01:25 -0500

drsgao gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

1 follower

Stats

Asked: 2020-04-17 07:51:38 -0500

Seen: 587 times

Last updated: Apr 17 '20