The problem that you're trying to solve starts with the understanding that for most real networks involved with rack diagrams we often have several objects between our server port and the router port (two patch panels, two patch cables, and an infrastructure cable (the one between the patch panels)). The formal way of describing these are called edges (our communications cables/links) and vertices (connection points / ports). The stringing together of these edges and vertices is called a "path". This kind of analysis is very common... We do it when we try to understand how a communications path works server to router, in piping diagrams, and understanding flowcharts. The pointer I referenced illustrates different ways to analyze paths (including a rack diagram). That's the first part of the problem, the second part is to identify what path a particular component is a part of (which might be solved by doing the first part twice, or once in each direction). In the code I wrote, none of this is based on what is on the drawing page but rather in the DB. You start with a naming plan for how to name a unique port (about 12000 in the sample) so that if someone writes it down you can find it. If the VBA is a little daunting, I'd suggest Michael McMillan's "Data Structures and Algorithms usning Visual Basic.NET", chapter 16 "Graphs and Graph Algorithms".
hth,
al