Since I wrote the graph you’re looking at, likely. Which primer are you referring to as I don’t recall that being in the Dynamo primer. I do know that I have run this graph with anywhere between 3 and 18 spaces to layout, all by updating the excel file.
The dictionary node is actually key to making the graph run in a reasonable time - dictionaries process the data much faster than lists, and they have the added benefit of maintaining an ordered structure no matter what you do.
In reviewing the content you provided, there are multiple errors before the dictionary is used.
- Your color listing has only two values for both the toilet and bedroom 2. You need to provide an R, G, and a B value for the graph to work. One failed input like this will cause a failure no matter what method you use for moving and organizing your data.
- You’re dropping one of the spaces which is going ot make it difficult to get the results you’re after - change the List.DropItems after your read the excel values from 2 to 1.
- In my example I had a hallway which connected everything - if you perform a design without one or if you’d like to add it yourself later you need to not drop the hall. Currently you’re putting a kitchen there, which is either very cutting edge, or more likely a result of some difficulty using the tool - sorry bout that.
- Spelling matters quite a bit - you don’t have to be accurate but you have to be consistent (true fact: I spent a weekend writing dependancies instead of dependencies and the code ran fine right up until I caught and started to correct the spelling error). In your case,
Living room isn’t the same as
Living room . Be sure to remove all the spaces at the end of your text or use a String.TrimWhiteSpace to do the work for you. This change in your excel data will resolve both the Dictionary.ValueAtKey node as well as the List.IndexOf node which follows.
Be sure to toggle true/false values to get your data output as well.