Need Help, to select only Component With multiple instances.

Hi

I need a command that only selects a component/Assembly, with multiple instances. 

But select the same component/assembly with different configurations, To open each one only once.

I've tried but opening all the same instances, so it takes a long time to run.

I appreciate it .

Thanks.

SolidworksApi/macros