# Getpipebyname but get rid of document input and replace with pipenetworkname

**URL:** <https://forum.dynamobim.com/t/getpipebyname-but-get-rid-of-document-input-and-replace-with-pipenetworkname/95626>\
**Category:** Civil 3D\
**Created:** [November 18, 2023, 6:37pm UTC](https://forum.dynamobim.com/t/getpipebyname-but-get-rid-of-document-input-and-replace-with-pipenetworkname/95626 "2023-11-18T18:37:31Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![qnliebbe](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/qnliebbe/32/198820_2.png) [@qnliebbe](https://forum.dynamobim.com/u/qnliebbe)\
**Post date:** [November 18, 2023, 6:37pm UTC](https://forum.dynamobim.com/t/getpipebyname-but-get-rid-of-document-input-and-replace-with-pipenetworkname/95626/1 "2023-11-18T18:37:31Z")

</div>

I have been using the getpipebyname node but have been running into a problem. I sometimes have similar names between pipes in different pipe networks. Is there another node or python script that would replace the document input with a document.pipenetworkname input. Thanks!

---

<div class="post-metadata">

**Author:** ![patrick.ericson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/patrick.ericson/32/121411_2.png) [@patrick.ericson](https://forum.dynamobim.com/u/patrick.ericson)\
**Post date:** [November 20, 2023, 1:27pm UTC](https://forum.dynamobim.com/t/getpipebyname-but-get-rid-of-document-input-and-replace-with-pipenetworkname/95626/2 "2023-11-20T13:27:59Z")

</div>

Maybe not so fancy but this is a way it can be made

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/9/19f6219e22aba6eeb50a4470048eeac7fb4da0c0.png)

---

<div class="post-metadata">

**Author:** ![qnliebbe](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/qnliebbe/32/198820_2.png) [@qnliebbe](https://forum.dynamobim.com/u/qnliebbe)\
**Post date:** [November 20, 2023, 4:27pm UTC](https://forum.dynamobim.com/t/getpipebyname-but-get-rid-of-document-input-and-replace-with-pipenetworkname/95626/3 "2023-11-20T16:27:57Z")

</div>

Thanks Patrick. I will try this out and let you know how it goes!

---

<div class="post-metadata">

**Author:** ![qnliebbe](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/qnliebbe/32/198820_2.png) [@qnliebbe](https://forum.dynamobim.com/u/qnliebbe)\
**Post date:** [November 20, 2023, 5:29pm UTC](https://forum.dynamobim.com/t/getpipebyname-but-get-rid-of-document-input-and-replace-with-pipenetworkname/95626/4 "2023-11-20T17:29:14Z")

</div>

So this works great for 2024 Civil 3d but doesn’t work for 2022 Civil 3d (I am missing some of the Camber nodes, see snip). Any work around till we update versions?  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/d/2de1956d385e9d8a42a06dc467bf1ab63fe11363.png)

---

<div class="post-metadata">

**Author:** ![mzjensen](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@mzjensen](https://forum.dynamobim.com/u/mzjensen)\
**Post date:** [November 20, 2023, 7:44pm UTC](https://forum.dynamobim.com/t/getpipebyname-but-get-rid-of-document-input-and-replace-with-pipenetworkname/95626/5 "2023-11-20T19:44:00Z")

</div>

Hi @qnliebbe,

Try installing the latest updates for Civil 3D 2022. Should be 2022.1 or newer.

---

<div class="post-metadata">

**Author:** ![qnliebbe](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/qnliebbe/32/198820_2.png) [@qnliebbe](https://forum.dynamobim.com/u/qnliebbe)\
**Post date:** [November 20, 2023, 11:47pm UTC](https://forum.dynamobim.com/t/getpipebyname-but-get-rid-of-document-input-and-replace-with-pipenetworkname/95626/6 "2023-11-20T23:47:44Z")

</div>

@zachri.jensen @patrick.ericson Any ideas why A5-1 and A7-1 are not working???

 ![dynamo snip1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/e/fef73ea85c790822962dbb0b8a3a58c6468ea201.png)

---

<div class="post-metadata">

**Author:** ![patrick.ericson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/patrick.ericson/32/121411_2.png) [@patrick.ericson](https://forum.dynamobim.com/u/patrick.ericson)\
**Post date:** [November 21, 2023, 5:05am UTC](https://forum.dynamobim.com/t/getpipebyname-but-get-rid-of-document-input-and-replace-with-pipenetworkname/95626/7 "2023-11-21T05:05:46Z")

</div>

Hard to tell without seeing the whole picture but are they unique items in the list?  
Try this node to get a list of unique items as a list  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/4/74d94c64513c24c1558449c0bc3d95214898f9cd.png)

and insert it after List.GetItemAtIndex

Can you upload an example dwg and your .dynfile?

---

<div class="post-metadata">

**Author:** ![patrick.ericson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/patrick.ericson/32/121411_2.png) [@patrick.ericson](https://forum.dynamobim.com/u/patrick.ericson)\
**Post date:** [February 3, 2024, 10:08am UTC](https://forum.dynamobim.com/t/getpipebyname-but-get-rid-of-document-input-and-replace-with-pipenetworkname/95626/8 "2024-02-03T10:08:24Z")

</div>

Did you found a solution in this one?

---

<div class="post-metadata">

**Author:** ![qnliebbe](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/qnliebbe/32/198820_2.png) [@qnliebbe](https://forum.dynamobim.com/u/qnliebbe)\
**Post date:** [February 21, 2024, 12:15am UTC](https://forum.dynamobim.com/t/getpipebyname-but-get-rid-of-document-input-and-replace-with-pipenetworkname/95626/9 "2024-02-21T00:15:08Z")

</div>

Solution:  
Instead of using getpipebyname. I used pipenetwork,getnetworkbyname and pipenetwork,pipes. Once I got the pipe names, I used list.firstindexof and list.getitematindex to find common pipe names.

As for the excel error, I believe it was spaces in excel. If a pipe doesn’t get updated, the first thing I do is retype the pipe name in the excel document.

Snip for reference:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/f/0feae547cfe3348d92053b4e8d29eb9fcb005de6.png)
