For the life of me I have the hardest time working with lists in Dynamo. I cant shake the “If/Then” logic of standard programming.
I am stuck I have a spreadsheet with a bunch of old ID numbers and new ID numbers in column A and B respectively. This translates to a dynamo list with 2 levels. At the second level index 0 represents the old ID and index 1 represents to the new ID. I want to find the model element associated with the old ID number in my view and pass in the New ID number to that model element. I can index my model view and populate a list of element ID’s I just cant find a way to make the comparison and pass in the new ID to the correct model element.
@Mostafa_El_Ayoubi,
That seems to do what I need however it returns a list of 361 items where there are 1320 model elements and 136 rows or entries on the spreadsheet. Being that none of the lists line up how could I pass the correct return value from the dictionary to the Element.SetParameterByName?
The hope is that the dynamo script matches the existing model elements with the spreadsheet data and updates the ID accordingly. I wonder if I could figure out a way to pass the Element ID into a list??