Pipe Elevation by Shared Coordinates

I put this graph together this morning. I wanted to report the shared coordinate elevation of pipes in a pipe tag. I used Dynamo to find the shared coordinate elevation and the pipe offsets and add them together. I then wrote that value to a shared parameter and added that parameter to my pipe tag. It works as expected, but I have some questions.

  1. Is there a simpler way to get the shared coordinate Z value? The code I used I pulled from another graph I found on this forum. It works but seems like it takes a lot to get a simple value from the model.

  2. I tried this script on a very large piping model and it’s taking forever to run because it’s applying the parameter value to every pipe. Is there a way I can speed up the process? One idea I had was to only update pipes that were tagged, but I don’t know if that is possible. Another thought is to somehow ignore any pipe that is vertical or sloped because this parameter would not apply. Thoughts?

Looks pretty good, but you could try removing the element.parameters node. That node collects every parameter for every pipe in the model, that’s probably taking a lot of time, maybe even more time than just getting the location values.

That’s a great suggestion. Thank you.

That took care of it. The model I was testing it on has 31,466 pipe segments. When I ran it the first time it churned for about an hour before I killed it. After removing the element.parameter nodes, it finished running in 1m 20s. Thanks again! I’ve attached the file if anybody wants to use it. The only thing you’ll have to change is the parameter name value.

Pipe Elevations.dyn (15.1 KB)

HI what add-in or custom node do i need to load to make this work

The only custom node is Element.Location which is in the Clockwork package.