# Find shortest path

**URL:** <https://forum.dynamobim.com/t/find-shortest-path/107801>\
**Category:** Revit\
**Tags:** python, dynamo\
**Created:** [February 6, 2025, 9:19pm UTC](https://forum.dynamobim.com/t/find-shortest-path/107801 "2025-02-06T21:19:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cbpires98](https://avatars.discourse-cdn.com/v4/letter/c/87869e/32.png) [@cbpires98](https://forum.dynamobim.com/u/cbpires98)\
**Post date:** [February 6, 2025, 9:19pm UTC](https://forum.dynamobim.com/t/find-shortest-path/107801/1 "2025-02-06T21:19:27Z")

</div>

Hello everyone, I’m trying to develop a way to automatically create pipes in my project, going from point A to point B. Without any intersection and using the shortest path possible. However, I can’t think of a way in which this is automatically functional within Revit through visual programming within dynamo. Does anyone have any idea what I can do? I am very grateful in advance for your attention.

---

<div class="post-metadata">

**Author:** ![Mike.Buttery](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@Mike.Buttery](https://forum.dynamobim.com/u/Mike.Buttery)\
**Post date:** [February 7, 2025, 3:39am UTC](https://forum.dynamobim.com/t/find-shortest-path/107801/2 "2025-02-07T03:39:06Z")

</div>

Hi Clauber,  
Please review this post [How to get help on the Dynamo forums](https://forum.dynamobim.com/t/how-to-get-help-on-the-dynamo-forums/4677)  
There are going to be many strategies available to optimise a pipe network, however going from A to B isn’t always a straight line. A search of Google Scholar will get you some papers to start thinking of strategies  
My first thought would be to get a oriented enclosing rectangle of points A & B then use the most suitable horizontal & vertical edges to create your pipes
