Import value of excel cell into a parameter


#1

Hi everybody, I just started to use Dynamo and I am having some trouble to import a value from excel to revit. I created a simple excel file to test the function, it looks like this :

excel

I would like to associate the number in the C column with the element in the B column. Here is what I have done :

My idea was to use a dictionnary in order to search in elements I have selected and then associated these elements with a value. I have used the same name in the excel file than in Revit but it appears that the dictionnary is not able to give me my list of value. I don’t understand why I am obtaining an empty list. I also tried to use the ID of the type instead of the name but I have the same result. Thanks guys, Nathan


#2

Here’s n example that does the same ting

3-Abreviation


#3

Thanks for your answer ! But I still can’t make it work … It seems like the equality test always returns false. Though, I have exaclty the same strings in excel and REVIT. Maybe it’s not possible to compare two strings, I don’t know. But anyway, I talked to my boss this morning and we will do differently !


#4

Hi Nathan,

Right now you’re feeding in an actual elements in the search keys. Try converting those elements to to their string representation either with “Element.Name” or “String from Object”.


#5

Thanks Dimitar, it was the problem, it works just as I want now !