Create a NEW schedule in Revit

Hi I’m pretty new to this and am trying to create a schedule view for rebar based on the selected elements. When I run this the first time everything works and I get the schedule I want. When I run it a second time with a different piece of rebar it used the same schedule and changes the filter value to the new piece. I think ScheduleView.CreateSchedule is storing the previous schedule id (highlighted in green) since the input name value is ‘REBAR SCHEDULE - F706-24’ but the output value is ‘REBAR SCHEDULE - F615-48’ which was the first input I had.

Is there a way to clear the previous input before running?
I was also curious if there is an easy way to select multiple elements and run each element individually creating a schedule for each element?

Thank you!

This sounds like an element binding issue. Run the graph via Dynamo Player or close the graph between runs without saving.

When I run it through the player it creates a new graph but doesn’t apply a filter to it. Is there a way to get the schedule field for the ScheduleFilter.ByFeildTypeAndValue without referencing the view that is created?

Not sure, but if you revisit the order and application I think this can be resolved.