Reference Set of a Solid Body

Hello,
I am looking for a way to get the reference set on which a solid body is visible. I understand that reference sets are for components, but I want to know which bodies within a component are on which reference set. Currently, I have to cycle through the component's reference sets and query the visible objects to see what solid bodies become available. We have 3 solid bodies within a component each belonging to only 1 of 3 reference sets. Does anyone know of a better way to do this, or of a more direct way to find out what reference set a solid belongs too?

If you have a reference to a reference set object, you can use the .AskAllDirectMembers to cycle through the objects contained by the reference set. You do not need to query the visible objects. If you have a reference to a solid body, you can query the reference set and compare it to the solid bodies contained in the ref set.