Results 1 to 3 of 3

Thread: Using Dictionary with multiple Keys

  1.    #1
    Moderator DaveP's Avatar
    Join Date
    January 10, 2011
    Location
    St Paul, MN
    Posts
    3,129
    Current Local Time
    02:24 PM

    Not allowed! Not allowed!

    Using Dictionary with multiple Keys

    Sorry for the screen snip. this is just a piece of a large graph. Hopefully everything I'm asking about is in the image
    I'm struggling with passing multiple keys into a Dictionary.GetValues node
    Why am I getting Nuls for the first two keys?
    It gives me the same results regardless of what Lacing I use, or if I "Use Levels". I've tried no Levels, L1, and L2
    If I pass in a single value (the code block "2222"), it returns the Room I'm expecting.
    But I can't get it to behave if I pass in a List of Room Numbers
    Click image for larger version. 

Name:	DynamoDictionary.JPG 
Views:	8 
Size:	126.8 KB 
ID:	37830
    TIA

  2.    #2
    Member
    Join Date
    November 4, 2012
    Posts
    85
    Current Local Time
    09:24 PM

    1 Not allowed! Not allowed!
    Are you sure that all numbers are strings on the key side? I think the problem is not if it's list or single, but with the 1001 value. This node outputs nulls just like in your image if it can't find a corresponding key. Maybe your room number contains a hidden unicode character or something like that and can't find it. What happens if you only add 1001 as key? What if the key numbers are in different order?

  3.    #3
    Moderator DaveP's Avatar
    Join Date
    January 10, 2011
    Location
    St Paul, MN
    Posts
    3,129
    Current Local Time
    02:24 PM

    Not allowed! Not allowed!
    You're a genius, infee!
    Way back in the beginning of this graph, I was inputting those from an Excel file.
    Sure enough, those first two values were formatted as numbers, not strings.

    Thanks
    Glad there was nothing wrong with my Dynamo logic!

Similar Threads

  1. X-Keys with Revit
    By willsud in forum Tutorials, Tips & Tricks
    Replies: 27
    Last Post: November 16th, 2017, 02:12 AM
  2. Building Coder: 1500 Posts, DevDay and Storing a Dictionary
    By Building Coder in forum Blog Feeds
    Replies: 0
    Last Post: November 21st, 2016, 10:15 PM
  3. BIM Dictionary
    By Dave Jones in forum Out There
    Replies: 13
    Last Post: May 3rd, 2014, 06:34 AM
  4. Revit OpEd: Shared Parameters aka Dictionary
    By Revit OpEd in forum Blog Feeds
    Replies: 0
    Last Post: September 11th, 2012, 04:15 PM
  5. Replies: 0
    Last Post: July 27th, 2012, 01:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •