Created piles back into Revit.....need help

Hi you all,

I could use some help.
I’m trying to make a script that reads the correct pile coördinations from a excel file, checks the new piles (from contractor) against the designed piles (in my revit model) and if that distance is larger then XXmm (measurement from cell in excel file) it puts that new pile in my Revit model. In a red color.

I’ve put some scripts together and I’m able to get the piles from my model in Dynamo and at the same time I got the new coördinates from the excel file in Dynamo. Also I got the currect piles exported to excel. And I’ve managed to insert a pile family to be created in my revit model at the new coördinates.

My first question would be: Can this all be done with just Dynamo nodes? So no custom, package or python nodes.
If the answer is “yes” then how can I calculate the distance between 2 sets of coördinates and have it listed again when it is equal or larger then the XXmm? Also I’d like to make that pile red in my model. I did find the “Overridecolorinview” but that’s for Elements…can that also be used for Family types?

Mike,

Can you post what you have so far and we can help fill in the gaps. It would be helpful to know how you want to decide which piles match if they coordinates vary. Do you have the unique numbers or are you going to base it on the “closest pile”.

Based on what I’m hearing the key is going to be:

  1. Making a list of piles that are modeled in Revit
  2. Making a list of piles that are in Excel from the contractor
  3. Match those lists so that the same matching pile is at the same index in each list
  4. Find XYZ for each list
  5. Find distance from Point in List 1 and Point in List 2
  6. Filter out the ones that match or the distance is less than (tolerance)
  7. Model the ones that don’t match
  8. Override the color of those elements (instance). Alternatively you could make a type property but instance color overrides make the most sense to me.

(I might be missing some portion in the steps above)

Hi Timon,

Here are my files (Titels are in Dutch):
<a class=“attachment” href="/uploads/dynamobim/original/3X/1/5Paalmisstanden.rvt (2.4 MB)
Paalmisstanden.dyn (45.0 KB)

Palen als ingemeten.xlsx (8.8 KB)

It’s just a test to create a the script. But when it works on a small model…it should also work on a big model.
The story behind this is we make pile drawings and piles are set at a specific distance from an axis for instance.
But the workers outside hardly can create the piles in precisely that location. So…after the piles are created they measure the pile locations using gps and then we get an excel with pilenumbers and there coördinates.
Then we we can check if the piles are not to far from there calculated position. If they are we must take action. making the fundation beam wider for instance.

So I would like to compare the list with created piles to the list with designed piles. And when they are further apart then X mm (set by a value in a Excel cell) I want it to show up in my Revit model in a different color then piles normaly are…therefore I want them to show up in red.

I hope this makes sence and that your able to help me.

Kind regards,
Mike

PS: the Z-value isn’t that important for this script.

Also a different thing: when I made the grid in Revid I used hole dimentions (2000, 7500, etc.)
When I get the coördinates from Revit to Dynamo they were not hole anymore. More like1999.9999999998 and 7499,999999997.
Is there an explanation for that?

Check out this article:

The internal database number is feet. I am guessing you are working in Meters, so there is minor accuracy issues with converting the fraction.

Hi Timon,

Thanks for the links, So nothing can be done about the large numbers. Okay then I’ll leave it there.

I’ve got a little further with my Dynamo script:
Paalmisstanden.dyn (48.8 KB)

I now have calculated the distance between the piles and added the pilenumbers to that lenght again so I can identify the piles. Now I need to compare the calculated distance to the pre-determent distance and get the coördinates from the piles were that distance is equal or larger then the pre-derterment lenght. And then have only those piles show up in red in my model.

I wasn’ t able to grab the revit file, but based on what I’m seeing you have nearly completed it. I might use a line between two points and then get the distance of the line rather than computing the distance. Either way works.

I used a formula to calculate the distance. Didn’t thought of creating a line and getting the lenght from it to be honest :slight_smile:
but now comes the realy hard part: picking the those distances that are equal and/or longer then Xmm (let’s make it 50mm that is being loaded from an excel file). And then link them back up to a pilenumber and then get the coördinates from that pile. Or get the pile coördinates directly.

Oh…here is the simple layout I’m using for this script:

That’s actually a lot easier than you would think. You will need to use the filter by Boolean mask. Once you understand how it works you will use it in every script to filter your lists.

In this example I compared two lists of piles and their locations. See how I split both lists of pile and points from Excel and Revit if the distance was less than 90?

Indeed! I found out after asking a different question here.
They to told me to use the List.FilterByBoolMask. And that worked nicely.
Here’s the last part of my script. I got it to work…now I only need to tweak it a bit.