Pile renumbering - need spline assistance

Hi all,

I am a relative newbie to Revit/Dynamo, I am a Junior CAD Technician for a structural engineering company, I am currently learning how to use Dynamo to number piles, however this specific tool requires use of a spline, and as I am trying to number 500+ piles, it is very difficult to use a spline due to not being able to continue a spline if you click off of it or if you make a mistake you have to start again.

I am asking for help for either a better way to draw splines so that if I click off the spline I can continue it, or how to change the dynamo script so that I can use normal lines and tab-through them to make it a “polyline” (I know Revit and CAD are different but polylines are so useful!) and go through each pile that way, or if there is a way to highlight every pile and run a script that instantly puts a spline through everything highlighted (assuming its on the same level)?

Hope that wall of text wasn’t too bad, if I am unclear and you need images to help demonstrate what I need help with I can easily provide them, any help would be greatly appreciated!



Might be worth sharing some images to help us get an idea. I’ve never heard of numbering piles using the spline tool?

For any numbering systems if it follows some logic you can normal automate it fairly easily, however, it kinda needs to follow some sort of pattern. For example, I work in MEP and I mark my lights from bottom left to top right.

if that’s the case look at the following:

If the numbering system is not that clear then I’ll need more information to help.

As shown in this image, the site is on the left with just the piles on the right, I am trying to number each pile on the right without having to run a spline through all of it.

Sorry mate, I’m clueless how using spline tool and numbering is related.


Using this dynamo script, I run the spline through all of the piles, then run the script, and it should number each pile in order down the spline, however this is a long and tedious process and I am wondering if it could be sped up.

Ahh alright gotcha,

Ermm, I wouldn’t know of a way to speed it up, like I said I use numbering via the method above. If there is a pattern in the numbering try and use that to your advantage.

But I’m afraid that’s all I know, sorry I couldn’t be of more use.

No worries thank you very much for the help :slight_smile:

I can figure the pain it would be to renumber this manually, so here is a proposal:

In short, I create solids from walls location lines (because it’s the easiest in my case, but any boundary lines would work as well) which I use to group the columns and to create a logical numbering sequence.
Group Curves is from Archi-lab Grimshaw and ObjectList.GroupByContainer is from Ampersand.
If a logical sequence is needed inside each boundary, I would probably take a look at Element.SortByCentroid from Chynamo for that.
Hope everything is clear enough…

Edit: to make it easier for others to find answers through the search field, could you pls reformulate the title of this thread (such as: Pile renumbering - need spline assistance)?

1 Like

Adjusting a spline isn’t actually all that hard - set your start point, and your end point, those are the only items you don’t want to move as they adjust the overall scale. From that point it’s easy enough to add and subtract points so you catch all elements.

You are correct that doing one spline to catch all elements is likely a bad idea. It likely isn’t such an issue to draw one spline for every building. Then decide what order your buildings want to be in. Then number your piles. Yes this means you are drawing about 50 - 60 splines. But drawing 50-60 splines is way easier than having to number 1-300 manually, and will allow you to adjust things faster as the design progresses.

If you post an image of your script we can weigh in on the best way to manage your lists based on the spline selections.

I don’t really like the group by container method here as the piles in a container will be sorted by their element Id not the sequence you want them to be in, requiring you use a sort by centroid in addition to the group by method, and even the built in sorting with the centroid can cause issues as the built in sorting method may not match what you want in the project.

Wouldn’t be easier to make use of the grids (if there are any in the project)?

Good idea @Yna_Db.

1 Like

Hi Jacob and Yna,

I appreciate your feedback, but excuse my ignorance but I don’t understand half of what you’re talking about so I’m not entirely sure where to go from here?

And no the drawing isn’t grid-based, its just overlaid onto the site layout provided by our infrastructure team.


PS: I have also updated the title as Yna suggested

Hi, you can do something like this for instance:

Hi Jostein,

Thank you very much for your help, I shall try this now and let you know if I have any further problems, much appreciated!