This script needs to manipulate with the schedule (show on the sheet) to show just the elements that are visible on that same sheet.
This script was made without a user interface, but you can customize this script to meet your needs. The thing which I wanted to show is how you can filter elements in the schedule in order to show just elements visible on the sheet or in the view.
The script will create a new parameter, compare values and automatically add a new parameter as a field. Then it will create a filter and as a final action, it will hide that column with the new parameter.
Please make sure that before you start using this script that you back up your existing project model.
Also, if you want to download this (and all other scripts) with my sample files please visit the Shop page.
The script uses the following Dynamo packages: Rhythm v.2020.2.13 Clockwork v.2.3.0 archilab v.2021.25.4