Dictionaries are an incredibly powerful tool for making associative sets between two equal length lists. The first is a list of keys (or indexes) and the second – a set of values (or the data that will be returned for each index).



  • keys: it must consist of unique strings or numbers.
  • values: a value that will be returned for each key.
  • search keys: the list of keys(indexes) that you want returned.

Manipulate data, sculpt geometry, explore design options, automate processes by remotely accessing your visual programming environment on trending virtual PCs from CloudDesktopOnline.com powered by one of the best DaaS providers – www.Apps4Rent.com.

The dictionary values can hold lists of objects:


Or Revit elements:


If a search key is not found in the dictionary, an empty list will be returned instead.


One thought on “Dictionary.ByKeysValues

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.