Dynamo and Civil3D... stepping through individual items in a list with one run

Hello,

I have a pipe network that I have brought into Dynamo (by object selection), and I have successfully been able to show the names of the pipes that make up that network in a list. I want to apply something to each pipe in the network with one run of Dynamo, basically by stepping through the list from beginning to end down the title column. These pipe names are not numbers, but letters and numbers (I use them for keys in dictionaries in other places). Is there a simple way to run through the list (which I have flattened already) and have it apply the command to everything at one time?

(In the attached image, at the far right you can see my list of pipe names from the network (strings). And this is where the train stops…)

Thank you,

CRF

Hi @Yellowjacket98,

First of all, you can save yourself the work of getting the strings from the pipe objects and extracting the names by simply using a Pipe.Name node or, even better, a CivilObject.Name node.

Here’s an example of concatenating a string to the end of your pipe names with a simple code block. Regarding your question about stepping through individual items, Dynamo will automatically do that - no looping necessary. And then at the end, you can use CivilObject.SetName to change the pipe names back in Civil 3D.

1 Like

The catch here is I only want a certain network selected at one time (since I do not want to select anything from other networks, especially the sanitary). I could not find a GetPipeNetworkByNake node so I set it up to grab the CivilObject.Name, then on to GetPipeByName, then it gives me the PipeNetwork.ByName.

I mistakenly hit before I finished my message…
I’m typing up more and will send it in a moment…

HYDRA - Complete.dyn (131.8 KB)
Attached is my successful run (which you helped me with from a previous posting…much appreciated on this end!) This run allows you to select a particular pipe and have it update flowline and HGL info based on the info provided in the spreadsheet=>list=>dictionary. It works well and good, and is very very quick compared to manual re-entry of items. However, I am trying to just select the pipe of a network and have it update all of those pipes at one time. So instead of selecting and running fifteen times for fifteen pipes, I want to select the pipe and update the entire network’s worth of pipe (two clicks for fifteen pipes). And I may be flying too close to the sun here… I am just ecstatic that the previous Dynamo run functions properly!

1 Like

And you my friend are a genius… I understand now what you mean by it running it all at one time. I just used the overall list of “pipes” instead of a single “pipe” and it worked. Now I can rest my brain for a bit! :blush:

~WRD000.jpg

image001.jpg

Good to hear!