From the Revit API perspective the element is visible (is not hidden or is not on a hidden category) but produce no visible geometry.
This is also possible on Rhino if you have a block instance on Layer A, but the Content is on Layer B and C, and you turn off Layer B and C the block instance is still “visible” but produce no geometry on viewport.
So what you want to filter out are elements that do not produce any geometry on a view.
‘Query Elements’ returns all visible elements, produce or not produce visible geometry on the view.
‘Element View Geometry’ extracts the geometry that element produce on the view, if the list length of the produced geometry is zero ‘Cull Pattern’ culls it.
The cull pattern needs to match the list tree in value count and structure. It looks like some of the elements have more than 1 item of geometry in them.
Just some feedback from me …I’ve not managed to replicate what @kike did … i.e. cull out the unwanted elements as RIR seems to think they are all visible even though they are switched off via subcategory.
However if I use a filter to switch off the unwanted elements than I achieve exactly what I wanted, meaning I only get the visible elements through to RIR.