Schedule add Filter Issue

Hi everybody,

I have a problem with adding a Filter to schedules that I create in the same script.

What I want to achieve is to create schedules for all the Rebar in the model, where I create a seperate schedule for each uniqie value for Schedule Mark. I then want to add a filter to each schedule to only show the Rebar that has the corresponding Schedule Mark value.

The problem is that when I run the script for the first time, the schedules are created but the Filter is not added. The ScheduleView.AddFilters node gives the following error:

*Warning: ScheduleView.AddFilters operation failed. *
The field ID is not the ID of a field in this ScheduleDefinition.
Parameter name: filter

If I then run the exact same script again, the error is resolved and the Filters are added correctly.
Any idea on how to make the script work correctly without having to run it twice? Below a graph of the script. The two inputs that aren’t shown are a List that contains the unique values for the Schedule Marks (in this case 1, 2 and 3).

Could really use some help with this one :slight_smile:

Try to get your filed from your view

Doing that creates a similar problem, where the script doesn’t work when I run it for the first time (ScheduleView.Fields returns an empty list) and does work the second time.

I have added the full dynamo script in case it would be helpful.

ARCADE_Create Rebar Schedules test.dyn (53.8 KB)

try to add passthrough node from clockwork before ScheduleView.AddFilters

The issue remains the same unfortunately.

Still have not found a solution. Does anybody have an idea? I could try to upload a sample file with the dynamo script if needed.