Replacing Dictionary key values (single string) with list of points

Hi,

Was wandering if anyone could help me solve an issue I’ve been battling with.

I’ve got a dictionary of many elements, each of which have a “Vertices” text string of points (See first Watch window).

I’m then getting the Vertices key values from those dictionaries, and converting the single text string for each element to a list of points (See second watch window).

I then want to replace the dictionary values at the “vertices” key with these new lists of points. However I’m only getting the first point of each list back as the key value, when there should be a list of points under each “Vertices” key.

Can anyone tell me where I’m going wrong?

Thanks!!

Hi @ryan.jones

You post a link to the pictures (i assume you can’t yet) via dropbox, wetransfer (send it to yourself and post the url you recieve) and other.

Apologies - hopefully the image is viewable now

the yellow nodes show theres something wrong
fix them left to right one by one until no yellow nodes show up
there are casses where a yellow node doesn’t matter, but since you have quite a few…

Hi Marcel,

The nodes to the right have been disconnected (hence the warnings) as I was just focusing on the dictionary replace nodes.

The error in the live nodes is for the “Dictionary.ValueAtKey” which is due to some of the dictionaries not containing a “Vertices” key (which I believe is not an issue).

Do you know why my “Dictionary.SetValueAtKeys” node is not returning all the points in each list? instead its just returning the first point of each list and I cant work out why?

Do you want a multi line text as a value for just one key?

Maybe do some testing with the \n

Like this but the other way around

The value for the “vertices” key should be a list of points (same structure as shown in the central watch box in my image above)