Pulling values from dictionary

Hi all,

I had an idea to pull the values based on table data I have (depending on 2 parameters). So, the fitting element will have size and angle. Based on these combinations, dynamo would pull the value from dictionary. However, I am not sure can that be done with just one dictionary. I made something like this? Any advice how to proceed further?

@Marcelo.Rak Try this:

or this in OOTB form:


Sure. Can work fine.
Having data in an external source like a text file or Excel might make updating catalog info faster. That can be used to populate the dictionary.


For variety …

dict.dyn (5.3 KB)

def val (siz:var[]..[],ang:var[]..[])
	in1 = List.IndexOf([90,45],ang);
	dct = {
		"28":[0.8,0.45], "22":[0.7,0.35],
		"18":[0.6,0.3], "20":[0.6,0.3],
		"16":[0.55,0.27], "14":[0.53,0.26],
	return	dct[siz][in1];

Guys…you are gold :upside_down_face:

1 Like