deselect objects with certain name

 From:  Andrei Samardac
5950.3 In reply to 5950.2 
Hay Michael,
I'm talking about function "Show selected objects" that has Rhino just thought about it.

What I want to do:
I want to change the objects that should be hidden.

For example I have A,B,C,D - 4 objects.
B,C,D are hidden . C and D have the same name - object 1.
I want to exclude C and D from hidden objects and left C hidden.

So i thought to make script
1. Unhide all objects
2. Revert selection
3. Hide
This will swap hidden and unhiden objects.
*
Than I select objects with same name by using /* Extend selection to same names */
Than hide this object
*
And run script again

 

What you offer is partially what I wanted, but it would be clear for you to make exactly the same function as Rhino has - "Show selected objects"