Finding nearest Points to Grid Intersections

Dear all,

i am working on following Task: My aim is to add the value of the nearest grid intersection to a window Family/room.

I was able to extract the intersection Points of the Grid in a list and also extract the midpoint (bottom) of the Windows. Now i tried to compare the two list to identify the nearest Point, but in my Dynamo (ver. 1.3.1.0) the “Get Closest N Points” won’t work anymore. There are a new package available?

Further, i dont know how to get Access to the bubbles of eaxh gridline, because i will add this value into the ID Data field Parameter “Kennzeichen”, for example “A/5”.

Maybe someone can push me into the right direction?

dyn ffile please find attached

Thanks!

ClosePoints.dyn (15.2 KB)

@Balko See if this works for you
ClosestGridIntersection.dyn (18.8 KB)
ClosestGridIntersection.rvt (1.3 MB)

5 Likes

@Vikram_Subbaiah: Thanks for your reply and your help. The script is doing well! One question is left: Imagine that the midpoint of the Windows which i grab with the “FamilyInstance.Location” is exacltly in the middle of two axes. Which one will the script take? The left or the right one? Maybe i can control this?

Thanks in advance and best regards!

1 Like

Maybe, you could determine the direction and then specify which to pick.
Post your attempt here, we could help refine it, if necessary.

Thanks @Vikram_Subbaiah!! This script is exactly what i was looking for to identify the grid intersection, how would you add the distances for each grid like the column location mark. I am using it for Pipe Accessories to identify shut off valves. for example C(-100)-1(350)?

@Vikram_Subbaiah @Gary_Mans
Hi Gary_Mans,

Have you solved this? can you please share that.

Also these work for a point objects right? Can we get it it for Structural Framing, like reporting this intersection in both ends. To that beam

Please help
Thanks in Advance
Anshad

Edit: Reworked the above graph to provide distances from nearest grids


DistanceToClosestGrids.dyn (54.5 KB)

Haven’t tried, but should work as long as you can get the distance from the grid to the elements

Thank You @Vikram_Subbaiah for the help, i have checked it with pile foundation, but the distance taking is very high, i am new to dynamo and learning the lacing concepts.
Is it depend on project base point? it is not in 0 (Zero) but about 98800.000mm how to control this while reporting distance?

Also can you suggest me any package or node to get the start point and end point of structural framing like here used Familyinstance.location (it is not taking for framing)

Thanks
Anshad C P

1 Like

Yes, I’ve corrected the above graph to address that issue.
Please try with the updated file.

Hey sir, I tried the script with columns but it doesn’t seem to work. Actually column are on the grid, I just want to assign the grid number and letter for each columns on grids. The script must be similar… But how to define what is the intersection point in curves? I have errors in geometry.DistanceTo in your script. As soon a I poot List.Lastitem and List.Firsitem , it is making an error. Can you help me define the interesection position and “assign” column to these points please? thanks for your help!

I updated the workflow slightly, also made it dynamo player friendly. thanks for all your hard work @Vikram_Subbaiah!

Elements_GridIntersections.dyn (56.1 KB)

5 Likes

This is great! how do you deal with multi segment grids?

Good day!
Thanks a lot for the script!
Is there some method to get the second closest intersection of the axes?
I mean to get pairs 1-2 / A-B