Rename Pressure Parts

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?

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.

2 Likes

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?

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#

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 (76.2 KB)

2 Likes

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.

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. :confused:

1 Like

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

What version of Civil 3D are you using?