I need help completing a workflow. I want to override the color of elements in a Revit model based on the value of a column in a CSV file.
Specifically what I am trying to do is I have a CSV file with a column that lists the construction stage of every element, i.e. in progress, not started or complete. I want the script to read this status for each element, and then override the color of the element, i.e. green for complete etc.
I can get two list, one for element Id, and then a code block with all of the status’s listed, but its the next step in filtering the element before the colour override that has me stumped.
Any help would be very much appreciated.
Edit: screenshot below. There also appears to be a problem with my List.GetItemAtIndex node, though I do not know what!?
Edit 2: I can now upload!!
Edit 3: I’ve uploaded the CSV file as an Excel file, if anyone wants a look!
I tried to share the csv but it would not let me. Perhaps I can set up a link?
Edit: I’ve uploaded it as an excel file instead, as that part of the workflow is not a problem.
Thanks sovitek. I’ve uploaded the file as a excel file instead, as I can manage that part. Its getting the lists to filter according to the construction status, and then applying the colours that I am struggling with.
timhevel, thank you very much! Could you share that dynamo file please? How do I get the colours to apply to the instances of the elements? Do I need some sort of filter?
Edit: timhevel, just to clarify, how do I do the linking of the colours to the status in the CSV file part?
Hi @MLynch yeah a dictionary is the way…but you have some element there give null becaurse it doesnt have any value in your excel/csv…so try filter them out first…