Question about dictionaries

I am upgrading my Dynamo skills I started looking into some old scripts and found this:


I use this set of nodes to verify which Floor / Wall and Ceiling types there are and then grab their indices.
So let’s say I have Floor type FT1, FT2, FW1 (wooden floor), then it skips FT3-15 en passes indices 0, 1 and 16

The rest of the script grabs these Type codes to:
Make a filterrule, create filled regions and tag them. Both using their related RGB code

This way between projects, all legends have the same color related to the codes.

I was wondering if converting the Dictionaries would be easier and I was curious on how to store such a Dictionary within Dynamo

@RevitRobot

Yes, probably. I’d suggest posting some sample data (you’ll get better answers if others need to do less typing)

Dictionaries are fairly straightforward- basically pairs of keys and values. The key point is that they don’t rely on indices and lists being in the same order. Take a look at the primer: