Elements to remain selected in Revit

I have a bunch of uniqueid’s which I export from excel. When I run the code shown below, the elements in the model get selected and deselected one by one. I want all the elements to remain selected in revit. Please help