Split Structural Column By Levels Revit 2024 [Not Working]

I have attached the dynamo file, It works well on Revit 2021. But now I am using Revit 2024 and it not working. I tried a lot but failed. can anyone please Fix this error. (Note: it works fine for splitting all levels, but not working for splitting selected levels.)

1. R2021_SplitColumns.dyn (26.0 KB)
Split Column by Levels.rvt (6.3 MB)

The script worked for me when laced like this