I want to get the index numbers of the list which is imported from excel file associated with the selected Revit elements using Dynamo. The problem I have is when I use the List.IndexOf node and connected the selected elements & list, I get the index “-1” that it is not valid.
I attach the screen shot of dynamo code for more clarification. I can’t figure out what is my problem.
When I want to get the specific For example here, I want to get the index automatically based on my selected elements here would be index number [07,14,21,28]
You aren’t getting any results since you are trying to see if a list of ElementTypes contains the string “Wall”.
These are not the same objecttypes and as such aren’t matched. You’ll have to get the name of the ElementType first.
Regarding to this reading data from the excel, I have another problem that keeps occurring. The parameters’ order in Excel must be in order with the select Revit element models in a dynamo, otherwise if I change the amount of offsets for one of the element. For example if the first row in my excel file is wall and I change the top-offset for the wall, if the first Revit selected model element in dynamo is window, the top offset of window is changing. How can I fix it.
For the wall orientation, how can I set the top offset, bottom offset to be associated the wall orientation?
Because if I go with “Object. Type” node, all of the walls would be the same type but in different orientation.
For example the top-offset in one wall would be the right offset in another wall in another direction.