New dictionary Keys/Values by filterd dictionary

Hello there, pls help me.

I have a List of 552 Solids. This List contains two different dictionarys, each one for another Crane. So each solid has two different CraneDistances.

At final i want to fill the main dictionary with “Reachable” and “Unreachable” Keys/Values, like the second picture.

I dont get it how to create this dictonary. Hope someone can help. Thanks.

2

You are connecting wrong values to “Dictionary” input. Take the output from “List.Transpose” to Dictionary.

But than become all 1104 Elements from the main dictionary the Values “unreachable” and “2”
Only the filterd 1008 Elements from dictionary should become “unreachable” and 96 Elements “reachable”.

I got it now. Then you should that:
Create a FilterbyBoolMask and connect as list the dictionaries (from List.Transpose) and as bools from (>) and connect them to SetValue at Keys

1 Like

Thank you! That works.

But nevertheless i cant replace that keys/values to the main dictionaries. i can only add them, so the dictionary grows to 647 Lists.

And by luck i find out an error at the “>” node. It didnt work as i tought. Maybe here an idea?
I also try changing the @L in all ways, but it still go wrong.

That one maybe?

Why do you split your list only to then recombine it?

you have a list of true/false that you can feed to (for example) an If node to assign your values to the SetValueAtKey node.

Tank you, I think thats a smart way.
I try it out, but there are some issues.

First: No one “Reachable” value appears in the dictionary.
Second: I have two lists in the dictionary (2208) The one with “Liftstatus” as Key and the other with “LiftstatusIndex”

Yeah that works. Thank you.

Ok guys,

i found a way to solve this. It is maybe not so pretty, but it works.