Because these images are so large I suggest doing this: Right click image…open image in new tab.
Alright…I will try my best to explain the madness that is going on here. The image exported from Dynamo was too big to upload so I split it into two. I will probably have to add more later as I do not have much time now but wanted to put this out there for digestion. Also, I do not remember everyone who helped me with this but big thanks go out to @Vykr
for sharing his original graph and @awilliams
for answering a bunch of my questions.
First you have to understand the naming convention we are using. Cable Tray is labeled as such 20CT01LV01 (first double digits denote the area of the project, second double digits denote that it is a cable tray, third double digits denote the network, forth double digits denote the power level, and the final double digits denote the segment of that cable tray network). A network, in this case, is a single continuously connected cable tray (if you were to tab onto it multiple times it would select the entire thing). This is important because ShortestPath (as mentioned before) MUST be completely connected in order to function properly. The Cable Tray label is constructed using three parameters: Cable Tray Network (20CT01), Cable Tray Power Level 1 (LV), and Cable Tray Segment (01).
Conduit is much simpler and is named 20LV001 (first double digits denote the area of the project, second double digits denote the power level, and final three digits denote the network or single run of conduit). This data is entered into the same Cable Tray Network parameter (I know it is not a cable tray but just go with it for now).
In terms of modeling practices, cable trays have to be connected completely and conduits have to be the same. If you want a cable to run off of a cable tray through a conduit the conduit must be connected to the cable tray.
The graph starts off with a few data shapes windows which help narrow down the area in which we are doing routing. The second data shapes window allows the user to select which Cable Tray Networks the user wishes to use, the power supply, the cable destination, the power level, and any specific conduits that need to be used (if any). The final data shapes window allows the user to select specific cable tray segments to ignore in an MCC room (the cable trays tend to do loops and I found that sometimes ShortestPath would not pick the shortest path so this was a work around.
Just above the data shapes node groups I have two groups that make sure all cable parameters are cleared and that a date is set for the time this was run on a specific cable. After that the graph figures out which elements to use based on your selections and pumps them into the ShortestPath node. It then pumps out data to a number of other groups. The top group on the right creates a cable routing label which lists all segments of the route concatenated with commas. The group below that creates separate labels for individual route parameters (this was done so that when we export it into excel the engineers could use the data in different ways). The third group calculates the total travel distance and puts it into a parameter. The bottom four groups get the closest points from the selected networks to the power supply and cable destination and calculate the Field Routing distance of the cable and plug those values into parameters.
When all is said and done, this is what the data output looks like:
The end result, for us, was that we spent a bit more time making sure that cable tray and conduit were modeled correctly but saved a TON of time on the engineering side calculating quantities. Our contract required us to provide this data so using this tool was well worth it. If you are not required to provide cable lengths and routes, this would be complete overkill.