Whilst there are many tools on the market to renumber piles and provide a pile marking scheme, many of these tools rely on the piles being nested into pile caps. This is useful for most of the piles it will not cover situations where piling is incorporated into ground beams or foundation slabs. Many of the standard numbering tools will also not group the piles and number clockwise. Most of the industry will want to number the piles as shown in the image below.
My new approach to this problem is to first collect all the piling in Dynamo, then collect the foundations and framing that the piling is placed into. I then intersect the geometry and group the piles by the hosting elements. Although I am referring to hosted elements, the piling is a combination of pile and pile caps, single piles placed into foundation slabs and piles placed into ground beams. The below image shows the piling intersecting with the foundation elements.
Here you can see a small section of the project with the piling marked. The blue geometry is generated by Dynamo. These are the foundation slabs, pile caps and ground beams.
Anyway, there is far too much to explain in this blog post so take a look at the YouTube video to see the script in action. I also run through the Dynamo graph and explain each section and the logic of how it works.
Hope this has been useful