Tools.GetSurroundingElements very uncooperative

Hey guys,

I’m trying to use Get surrounding elements to put an Area number to various elements within that area. The problem I am having (among many) is that sometimes it picks up elements, and sometimes it does’t, regardless of the tolerance. I will run it on one level, and it works, then move to then next level and it returns nothing. Then move back to the level it just worked, run it again and get an empty list!!! It is driving me a bit mad. Any ideas?

Thanks

@Sam_M can you upload your .dyn file or an image of your graph?

1 Like

Are you using elements from a linked model by any chance? If so, then read my post here, as its the same problem, in which case, there will be a solution coming in BimorphNodes BoundingBox.GetElementsInside and BoundingBox.GetElementsIntersect which do the same thing as Tool.GetSurroundingElements

The other issue you may have is the tolerance input; I believe this node was developed before Dynamo adopted the active working units from Revit which meant units were always fixed. Hence, Tool.GetSurroundingElements tolerance inputs must be in Revit internal units to get consistent results (decimal feet). Alternatively, BimorphNodes BoundingBox nodes use whatever your active file units are, and will convert them dynamically to Revit internal units as its more intuitive.

2 Likes

I’ll post the graph tomorrow when I’m back in the office. Thanks.

Hey Thomas,

No, the elements are in the native file, not linked.

I’ve tried using the boundbox node, and would ideally prefer that method. But I get a null return when using the area collector. I’ve also tried geometry intersect by converting the areas to dynamo surfaces and extruding them, then trying to see if rooms or other elements are intersecting, that kind of works, but is messy. And again because the area collector is not working for me, I have to use room boundary to make the area curves into surfaces, and end up with errors…
Again, I’ll post the graph tomorrow, hopefully it will make a bit more sense then.

Thanks

As requested please find the graph attached below.
I ran this on friday afternoon and it picked up the doors fine. I ran it again this morning, and as you can see, it is missing the doors??!!?? Getsurroundings.dyn (19.6 KB)

Update: I can now get it work consistently, but I have to clear the inputs into the getsurroundingElements node, run in, then plug the inputs in and run it again every time.

Update 2: Not working now!!! Arghhhhhhh this is frustrating.