Find element (wall) closest to or overlapping with coordinate?

Hi,

quick question

I need to find the element closest to or overlapping with a coordinate (x,y,z).

How would this be done?

1 Like

Hi, you have to show some work yourself, but a hint could be to check out the Geomtery.ClosestTo node in Clockwork package! :slight_smile:

I tried to make a nice simple descriptive image with only a few nodes and few walls in revit, but after 3 random Dynamo crashes I gave up. :-S

I’m looking for something similar to the Geometry.ClosestPointTo node, I just need the element, not the geometry of the element. :slight_smile:

I need it for a large Revit model with many elements, so I was hoping not to use the geometry if that’s possible…

Well, never give up, Thomas! :wink: You will have to do some kind of geometrical evaluation one way or another, I think. Maybe the raytracer? Here’s a quick and dirty script, that doesn’t solely rely on the walls centroid:

1 Like

I finally found time to look at your answers and they both works brilliantly. Thanks, @jostein_olsen and @erfajo

Hei
I have several Elements of category Duct.Accessories in a Space. I am trying to get the Duct.Accessori that is closest to a line endpoint in the same Space. Eks. if i have tree Duct.Accessories i get tree elements from the OUT port of the script.
How can i get the only one that has the closest distance from the line endpoint ?