Dictionary By Springs

Hi everyone!

I’m having some problems with Dictionary.BySprings Nodes where the results don’t seem to be correct.
It seems that the inputs are fine (in my mind) but the results don’t seem to match.
Any ideas why?

Thanks

Hi,

your transformation to string is not correct. The first item does not have 140300 in its name.

Hi Deniz,
I do not think that is the issue, I’ve fixed the list but the results are still incorrect. :frowning:

Try to filter elements also… you have 5 keys and 7 values.

hmmm, why do I need to filter?
Does the Springs Node not select the elements that correspond with the search key from all the values?

The node is working correctly in both images. What are you expecting as an output?

I am expecting the node to sort out from Revit elements the ones that correspond to search Keys values, so the result will be the walls CUR_Wall-175,215,235,265-RC.

It is, but your lists aren’t sorted correctly. The first item in your search list corresponds to index 5 in the keys list. Index 5 in the values list is CUR_Wall-215-RC. Your Dictionary is defined by the keys and values as pairs. Your pairs are not defined correctly. They need to be in the correct order when defining the dictionary (remove the first two wall types). Hope that helps.

Ok, I haven’t though of that.
Will work on it and get back yo you with an answer, hopefully soon :slight_smile:.

Thank you

Hi Nick,
Finally I had some time to play with the script :slight_smile:
I’ve managed to get the walls that I want but for some reason Element.SetParameterByName does not shift to the walls set by the dictionary… they are all as the default size set in the Wall.byCurveAndLocation node.

:triumph:

Your image is illegible. Zoom in so your nodes are visible then use the camera button in the top right corner of Dynamo to export an image of your entire workspace. I’m guessing it has something to so with the list structure of your elements. You probably don’t want all those list levels.

1 Like

We still need to be able to see the Wall.ByCurveAndLocation outputs. That’s where I think your trouble is coming from.

Hope this is ok

What are you expecting or trying to do? You have 4 parameter values for 10 elements. You also definitely need to clean up your list of elements. All those sublists are confusing the SetParameterByName node.