Expert Designer - VBA and networks

I'm working on some validation code.  I want to look for all the valves in a design, then determine what pipes they are connected to, and compare their diameters.  Seems straightforward and deterministic.  I have figured out how to loop through a design, process only valves, and look at their connectivity; but all I see are the number of connections.  How can I dicover the features that are attached to the valve?

Code snippets are wonderful, but I will gladly accept some heuristic advice.