Find the nearest path from poin to point based on a cable trays of Revit

Hi everyone, I´m trying to create a script that let me find the shortest path from the nearest cable tray from the electric panel, to the nearest cable tray from the electrical consumer.

Do you know any package that contains something useful for this idea?

Mi idea is to achieve a polycurve route based on he cable trays model of revit. Then, I only need a node that give me the shortest path, from point to point takeing this polycurve as route.

Thank you all!

Hi Jbarbara.ext

What have you got so far? Maybe the Dynamo Script with Errors?