Invisible Objects overlaping with visible objects

Hello, I have A series of families that has metal studs placed into it in different locations. I Control the placement using the visibility parameter associated with another parameter.

Recently noticed that some of these families have warnings, some studs are overlapping, but when I check on the families by literally moving the stud there is nothing behind, I figured that the overlapping stud is actually a stud that the visibility setting is set to off.

I am trying to read the visibility parameter of each family instance so I can create a script to return the correct quantity of studs but I am failing to read the visibility property.

Please help, not being able to read the correct instances is a deal breaker.

It’s impossible to help without the relevant files - please post a section of the .rvt and the Dynamo graph you’ve produced to this point that’s returning the error message.

OK, well I found out that there are 2 situations I would need to address.
On this pict, the highlighted position has 2 elements.

I would like to automatically ignore 1 if two or more identical instances are occupying the same space.

The second thing is, the family creator is throwing an overlapping instance error in cases they are not actually overlapping. One is “turned off”, visibility is off. What I did to solve that, I rotated the Family 90 degrees and flipped the work plane, this worked for me, so now even though they overlap, the script actually ignores the nom visible instances.

1D. Wall Panel Left RO.rfa (1.4 MB)
I Cant send the rvt file because I manually solved all errors on this file.
Data Extraction.dyn (125.9 KB).

the later is the dynamo script I am using to obtain the data.