Making dictionaries by conditional statements

Hi everybody,

I am trying to build a dictionary as a 2D graph which is to show the adjacent points-lines. I have already checked the intersection by a boolean condition (Does.Intersect) and now I need to filter the nested list of lines (curves) according to the boolean value as a sublist of the point they intersect with.

I have tried this with code blocks and nodes but I still cannot see a right result. Here you can see the nested lists and the situation:

list of points:


List of Curves:


and the intersection checking



I cannot flatten the nested lists as I need the lists as the registration benchmark for later analysis. I cannot also use List.Flatten and List.Chop later as the number of the points and curves are not the same in each sub list in level@3.

Can you post your dyn file and a sample revit file to run it on? Lacing and list levels are very difficult to work out without a dataset and recreating stuff just to get to where you are will be time consuming.

1 Like

Hi Jacob, Sorry for late answer. As I do not have the ownership of the model I have made an example file in Dynamo.example.dyn (115.2 KB)

I have succeeded to filter the nested lists successfully, Here you may find the result. Now the main problem pops: Is there a way to define dictionaries with entities (such as points) as keys and entities (such as a list of points) as pairedexample2.dyn (124.9 KB)