We are trying to compare two Revit files. The first file is a an old survey model in which some elements were set to be demolished in the Construction Phase. Some elements were also split. The second file is a newer version of the above file and we would like to transfer the “Phase Demolished” value to the same elements (ID) (though not direct, but as a note into a custom parameter). At the same time we thought to run a comparison between the Bounding Box of each of these elements in the old file vs. the new file. If a Bounding Box has changed we would like to write a comment into yet another custom parameter.
We have managed to extract Element ID, Phase Demolished and Bounding Box into an Excel table and read that data in a new Dynamo Script. This new Script is also finding the same values for all elements in the new file.
We are now struggling to compare the two sets of lists. I have tried “List.SetDifference” with “List.IndexOf”, but it doesn’t work as I expected.
The plan was to retain only those elements from the current model file that are also in the list of elements from the excel file.
I would like to know if what I am trying is actually the right approach, or if there is a better one. Once I get past this hurdle, my next challenges would be the following steps. Maybe you have some tips there as well.
The next step would have been to write the value from the excel file for each matching Element ID from the “Demolished” list into the custom parameter “Transfer - Phase”.
After comparing the strings from each elements Bounding Box I would have liked a True/Fase value in the custom parameter “Transfer - Bounding Box Check” for whether the strings are identical or not.
I have attached the files used.
data.xlsx (139.3 KB)
Tools - Write Demolition Status for Forum.dyn (76.6 KB)
Tools - Extract Demolition Status for Forum.dyn (50.2 KB)
Thanks a lot in advance.