Help animating a Building Construction schedule

I’m trying to animate a construction schedule with the use of a slider bar to advance the schedule or reverse it. Basically, the slider represent the timeline of the schedule. I set the increments of the slider to be 1/the # of total weeks in the project.

In Revit I add a parameter to each element that holds the week # for which it will be constructed and then I export it to UE4 (4.21, because my graph doesn’t work in 4.22 at all) using Datasmith.

Now back in unreal , I added a graph to the level blueprint that first turns off all the objects. then as the slider moves, its compares the week# from each object with the slider location. if the week number is greater then the slider position, the element remains off , other wise its turned on.

When I press play, using a new editor window, I’m having a few issues. First, My Revit model has 42,000 elements in it (the image below is not the whole model). so scanning them all and comparing the values faster than one can slide the bar is not really happening. It crashes, unless you take your time. Clicking the bar one increment at a time seems to be the most stable but not practical. The error is usually in the “for each Loop”. Is there a way to add error catching that makes it stop comparing the values and maybe just reports the final slider position once released? The image below is the graph I’m using currently.

Is there another method to do what I want. I think ideally a scripted way to add these items to an animation sequence and then have it sync with the slider would be most efficient. But maybe its easier to group all the elements with the same “week number”, and turn the appropriate group on /off based on the slider position. Can python read the datasmith info and transfer it to a Tag or group objects by datasmith info? …

I’m desperate to find the most efficient (time and PC power ) way to do this. I’ve already blew one project interview and I cant let it happen again. Any suggestions will be greatly appreciated.

PS. There seems to be an issues when I use the launch button to play involving datasmith. the Game loads and interacts fine, but as soon as the slider bar is touched , it gives a fatal error. I’ve detached the datasmith graphs and relaunched and the slider works fine and there is no fatal error. In version 4.22, UE wont allow me to create the “get all objects and values for key” node in the level blueprint, Any insight on these issues would be awesome too

Do you have enough memory? Check that.

I presume there is some instancing going on from Revit, otherwise 42.000 it a lot of draw calls.
Regarding the loop error here’s a far better ForEachLoop with Timer Loop with Timer Unreal Engine 4 Tutorial - YouTube