# Rename Pressure Parts

**URL:** <https://forum.dynamobim.com/t/rename-pressure-parts/69906>\
**Category:** Civil 3D\
**Created:** [November 2, 2021, 3:01pm UTC](https://forum.dynamobim.com/t/rename-pressure-parts/69906 "2021-11-02T15:01:56Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![hestingjj](https://avatars.discourse-cdn.com/v4/letter/h/bbe5ce/32.png) [@hestingjj](https://forum.dynamobim.com/u/hestingjj)\
**Post date:** [November 2, 2021, 3:01pm UTC](https://forum.dynamobim.com/t/rename-pressure-parts/69906/1 "2021-11-02T15:01:56Z")

</div>

Does anyone know if there has been any development towards a pressure part renaming tool (similar to the renamer tool for pipe networks). This is probably something that could be taken care of with a Dynamo graph. User would need to select the first part they want to rename and then the last part they want to rename, and Dynamo would extract the pipes/fittings/appurtenances in between and provide a list to which a re-naming algorithm could be applied? Any thoughts on how to implement something like this?

---

<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 2, 2021, 3:27pm UTC](https://forum.dynamobim.com/t/rename-pressure-parts/69906/2 "2021-11-02T15:27:05Z")

</div>

Hi @hestingjj,

If you have Civil 3D 2022 then it should be fairly straightforward since the parts are grouped together in Pipe Runs. Example using the Camber package.

 ![RenameRuns](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/9/e95bd923abcb2634da7bbcd55b94c1c133f08c5a.png)

---

<div class="post-metadata">

**Author:** ![hestingjj](https://avatars.discourse-cdn.com/v4/letter/h/bbe5ce/32.png) [@hestingjj](https://forum.dynamobim.com/u/hestingjj)\
**Post date:** [November 2, 2021, 5:37pm UTC](https://forum.dynamobim.com/t/rename-pressure-parts/69906/3 "2021-11-02T17:37:40Z")

</div>

Thanks. In addition, I would like to separate the Pipe Run list into sublists of Pipes,Fittings, and Appurtenances. Is there a reason that the List.Contains node doesn’t work for this so I can filter by bool mask?

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/7/b7bb4ca4d150b6afac27c42e50b0ac44af063fa6.png)

---

<div class="post-metadata">

**Author:** ![hestingjj](https://avatars.discourse-cdn.com/v4/letter/h/bbe5ce/32.png) [@hestingjj](https://forum.dynamobim.com/u/hestingjj)\
**Post date:** [November 2, 2021, 6:05pm UTC](https://forum.dynamobim.com/t/rename-pressure-parts/69906/4 "2021-11-02T18:05:02Z")

</div>

I was able to get the list to filter as I previously posted the question using string contains and the PressurePart.Domain node from Camber. My last question on this would be what the code block would need to look like to rename each network part in the lists and essentially add the next additional number identifier to the name. For example, PressurePipes would look like P01-P01, P01-P02, P01-P03, etc. PressureFittings would start out P01-F01, P01-F02, P01-F03, etc. That is Alignment#-Pipe# and Alignment#-Fitting#. Appurtenances work in the same way.

I haven’t ever written any code blocks that change the numbers at the trailing end of a name before, but that is how our naming workflow essentially works. Alignment#-Pipe#

---

<div class="post-metadata">

**Author:** ![hestingjj](https://avatars.discourse-cdn.com/v4/letter/h/bbe5ce/32.png) [@hestingjj](https://forum.dynamobim.com/u/hestingjj)\
**Post date:** [November 2, 2021, 6:58pm UTC](https://forum.dynamobim.com/t/rename-pressure-parts/69906/5 "2021-11-02T18:58:41Z")

</div>

Here is what I came up with that will work (although I’m sure efficiencies can be made). The graph needs user input for the name of the Pressure Network and Pipe Run for which parts will be re-named. The User then has a few more inputs to adjust the label names, and range of creation. This is done for the Pipes, Fittings, and Appurtenances. The graph will then rename parts based on your updated naming convention.

I have sure that efficiencies can be made to the areas where I’ve included user input on the string for the name and the total number of rename strings created. I am beginner level at DesignScript for this type of thing, but I would think that those extra inputs that I have in my graph could all be combined into a code block for each part type (pipe, fitting, appurtenance). Feel free to critique after you all take a look.

Thanks,

[JJH\_RenamePressureParts.dyn](https://forum.dynamobim.com/uploads/short-url/1VACtXw9WatyId9NeY5avT4UH7W.dyn) (76.2 KB)

---

<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 2, 2021, 7:04pm UTC](https://forum.dynamobim.com/t/rename-pressure-parts/69906/6 "2021-11-02T19:04:32Z")

</div>

> [@hestingjj](#):
>
> I was able to get the list to filter as I previously posted the question using string contains and the PressurePart.Domain node from Camber.

Great! Another approach for doing this that will work with any object is to use the _Object.Type_ node and then filter by the contents of the strings.

 ![PartTypes](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/7/a7d7d435c9a07f1bfd01dd026c78da7dd4ffe487.jpeg)

> [@hestingjj](#):
>
> Is there a reason that the List.Contains node doesn’t work for this so I can filter by bool mask?

The reason for this isn’t because of the _List.Contains_ node, but rather the fact that Pressure Parts in Camber are not the same as Pressure Parts from the Civil 3D Toolkit, so the nodes can’t be mixed and matched. The _Object Types_ dropdown node doesn’t have options for the objects related to Pressure Networks by default, but Paolo did some tricky work under the hood to be able to add additional options to that dropdown using the _DocumentExtensions.AddNewTypes_ node. I specifically chose not to do that with objects from Camber, but I realize that it is confusing. Unfortunately it’s going to continue to be confusing until more core objects are implemented in OOTB Dynamo for Civil 3D. 😕

---

<div class="post-metadata">

**Author:** ![mayedFQLB8](https://avatars.discourse-cdn.com/v4/letter/m/ce73a5/32.png) [@mayedFQLB8](https://forum.dynamobim.com/u/mayedFQLB8)\
**Post date:** [June 16, 2022, 12:53pm UTC](https://forum.dynamobim.com/t/rename-pressure-parts/69906/7 "2022-06-16T12:53:56Z")

</div>

i can’t find pressure pipe run . parts in the search

---

<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:** [June 16, 2022, 1:03pm UTC](https://forum.dynamobim.com/t/rename-pressure-parts/69906/8 "2022-06-16T13:03:52Z")

</div>

What version of Civil 3D are you using?
