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

**URL:** <https://forum.dynamobim.com/t/replacing-dictionary-key-values-single-string-with-list-of-points/27369>\
**Category:** Lists-Logic\
**Created:** [October 18, 2018, 11:34am UTC](https://forum.dynamobim.com/t/replacing-dictionary-key-values-single-string-with-list-of-points/27369 "2018-10-18T11:34:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryan.jones](https://avatars.discourse-cdn.com/v4/letter/r/f07891/32.png) [@ryan.jones](https://forum.dynamobim.com/u/ryan.jones)\
**Post date:** [October 18, 2018, 11:34am UTC](https://forum.dynamobim.com/t/replacing-dictionary-key-values-single-string-with-list-of-points/27369/1 "2018-10-18T11:34:15Z")

</div>

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!!

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/d/bd81c0333975354ed97417ee7900f0dd83bc54f4.png)

---

<div class="post-metadata">

**Author:** ![m.rijsmus](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@m.rijsmus](https://forum.dynamobim.com/u/m.rijsmus)\
**Post date:** [October 18, 2018, 11:37am UTC](https://forum.dynamobim.com/t/replacing-dictionary-key-values-single-string-with-list-of-points/27369/2 "2018-10-18T11:37:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ryan.jones](https://avatars.discourse-cdn.com/v4/letter/r/f07891/32.png) [@ryan.jones](https://forum.dynamobim.com/u/ryan.jones)\
**Post date:** [October 18, 2018, 3:29pm UTC](https://forum.dynamobim.com/t/replacing-dictionary-key-values-single-string-with-list-of-points/27369/3 "2018-10-18T15:29:20Z")

</div>

Apologies - hopefully the image is viewable now

---

<div class="post-metadata">

**Author:** ![Marcel\_Rijsmus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/marcel_rijsmus/32/8539_2.png) [@Marcel\_Rijsmus](https://forum.dynamobim.com/u/Marcel_Rijsmus)\
**Post date:** [October 18, 2018, 4:58pm UTC](https://forum.dynamobim.com/t/replacing-dictionary-key-values-single-string-with-list-of-points/27369/4 "2018-10-18T16:58:56Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![ryan.jones](https://avatars.discourse-cdn.com/v4/letter/r/f07891/32.png) [@ryan.jones](https://forum.dynamobim.com/u/ryan.jones)\
**Post date:** [October 22, 2018, 8:48am UTC](https://forum.dynamobim.com/t/replacing-dictionary-key-values-single-string-with-list-of-points/27369/5 "2018-10-22T08:48:36Z")

</div>

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?

 ![Capture%201](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/e/1ec18c73b19c2e8fc8d2b6e28dce289454882e32.png)

---

<div class="post-metadata">

**Author:** ![m.rijsmus](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@m.rijsmus](https://forum.dynamobim.com/u/m.rijsmus)\
**Post date:** [October 22, 2018, 9:11am UTC](https://forum.dynamobim.com/t/replacing-dictionary-key-values-single-string-with-list-of-points/27369/6 "2018-10-22T09:11:22Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/9/89b1d145fe03bfedb189eeff7c52e823006109cd.png)

Maybe do some testing with the \n

Like this but the other way around

> [@Create single line Text from Multiline Text](https://forum.dynamobim.com/t/create-single-line-text-from-multiline-text/7880):
>
> Hi Experts, How to split the Multiline text using Enter as the separator? Tried " /n" but doesn’t work! Any ideas?? Need Syntax or a way to identify Enter in a string so that it can replaced by something else like “-” The idea is to copy content from the Sheet Title (which has been set up a Multi-line text and values fed from Excel already) to match the same value from the Sheet title into the View’s Title on Sheet parameter Rest of the stuff from my graph works… except that it comes in as t…

---

<div class="post-metadata">

**Author:** ![ryan.jones](https://avatars.discourse-cdn.com/v4/letter/r/f07891/32.png) [@ryan.jones](https://forum.dynamobim.com/u/ryan.jones)\
**Post date:** [October 23, 2018, 8:01am UTC](https://forum.dynamobim.com/t/replacing-dictionary-key-values-single-string-with-list-of-points/27369/7 "2018-10-23T08:01:04Z")

</div>

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)
