Find Matching Points by XY and filter out without pair, Z is different

I am looking for a way to find matching points pairs by XY, ignore Z because is different

I used List.GropByeKey also List.SortByKey but does not work for me
as it is OK when sorted by X for some point and then is not when sorted by Y,
also not sure how to filter out Point without any pair?

thanks for help,

1 Like

I had to use Python, I manage to get XY sorted and matched by pairs,
However not sure how to export now two main list lists: first will be pairs and second ids.

see attched script

Code.txt (703 Bytes)

OUT = pairs , ids


Thanks… so simple

Sorry, may i ask you?
I tried to use this Python, but it’s not working…
Could you check the attachment?
Thank you.

Hi, i also tried the python code and it never worked for me either.
Also I’m trying to include the Z value. I’m using dynamo 2.0 which is probably the reason why the code isn’t working.

Can @DynamoCanDo and @Ke2king make a new post with your questions? This post has already been solved and is 2 years old, so Dynamo and Revit versions may differ.

In your posts, be sure to include what the error is, as that is how we can actually figure out what is wrong. Also add your code and maybe the Dynamo graph as well.

Your guys’ errors are probably due to level issues, as the OP used list of lists and specifically found the first point in every list, where, at least from Ke2king’s picture, he is using a single list of points.


fair enough. Will do. Thanks

1 Like