Hi,
Hope this come out right. β¦
I have an Excel list that I have 2 values Name and Number that I am comparing with rooms parameter Name. Then I go through the list an check if the Name is compared with the Revit Name list if so then it should write the name to the rooms Number.
But my problem is when I have found out which rooms are listed in the Excel list, how i write it to the element with the same room name. Or how do I filter out the same elements as I did with the list, where I found out the names compering.
Here is the Python script that I am trying to make.
list1 = IN[0] #Takes inn Excel list values
list2 = IN[1] #Roon Names Value from Revit
elemList = IN[2] #Rooms Elements
mylist = [[],[]]
elements = []
for i in IN[2]:
elements.append(UnwrapElement(i))
elementIds = []
for i in elements:
elementIds.append(i)
for i in range(len(list1[2])):
if list1[2][i] in list2:
mylist[0].append(list1[2][i])
mylist[1].append(list1[4][i])
#Assign your output to the OUT variable.
OUT = mylist, elementIds
Hope that there is some understanding of this. Quite new at Dynamo and Python Hope you can help
Regards
Kristjan