If your objects of interest are family instances and you have control over the family definition, you could simply ensure that the family definition contains only curves, no faces or solids. That would guarantee what you require.
However, you leave a lot unsaid.
For instance: are the objects occluding you object other instances of your own objects, or other Revit elements, or something else?
It might also help if you explain what the purpose is of this entire exercise.
Maybe there is some completely different why to achieve what you need?