Looping through lists

Hi,
I am trying to loop through a list of materials for a selected element in the Revit, and create a new material by matching the material list coming from excel. I tried using the ‘LoopWhile’ node, but the results are not as expected. Only the first material layer is changed, whereas others are not.

I am currently using Dynamo 2.12.

I tried similar topics in the forum, but I couldn’t resolve the issue.

Any help is appreciated!, Thanks.

@nim65 , hi

hmmm can you share some screenshots more? sounds like using opertators and for loops … is a better way…

Hi, do you want the complete graph?

yes, with the expected result.