Add schedule filter node error (ScheduleView.AddFilters)

Hello,
I’m trying to create schedule filter by means of ScheduleView.AddFilters and get the following error: The filter value is not valid for the field and filter type. Parameter name: filter
Any ideas of fixing it?
I have searched through this forum and found a couple of old topics. In one topic this node works good, in another topic a user had the same problem with no solution…

Image%204007

I have also tried to feed “sheduleView” and “sheduleFilters” parameters with single-item lists in different combinations.

2 Likes

Hi @tuuletin

It works for me:

DYN file here AddFilters.dyn (4.8 KB)

2 Likes

Try making the value a numerical 1 rather than a string “1”. I assume the load in the schedule isn’t a string but a number?

Hello, SeanP!
This node requires string for “value” paratemer, like in Kulkul’s example.

Hello, Kulkul.
Thank you for the example. I have made the same and it works for me too (this is for a text parameter).
But I’m trying to create a filter, for example, “less than” for a numerical parameter. Can you do this?

I have a space schedule. AddFilter works fine for the text parameter “Space name”

But gives an error when I’m trying to filter by the number parameter “Room: Area” from a linked model.

Maybe a problem in the linked parameter? Ok, here is the local parameter “Full heigth of a space”.

Hello @tuuletin

Could you share rvt file here? If you’re unable to drop then use google drive/ dropbox or similar services and share the link to revit file here.

I may be going the wrong direction here, but can you confirm that you can use a less than filter on a string value like this using the Revit UI? I believe that the options for filters change based on the parameter types.

Sure you can :slight_smile:

Ah.

This confirms that aardvark is in face less than an elephant, which is less than a mosquito… all of which are less than a zebra. Pretty sure there is a kindergarten down the street which teaches that… shoulda guessed it.

Seriously though, careful using strings as integers - unexpected results may occur.

1 Like

Room: Area and your space height are number parameters are they not? You’re setting up your filters for numbers less than the string “10” and “3000”. They have to be numbers, not strings…

2 Likes

Thanks for the replying to everyone.
The Node ScheduleFilter.AddFilter requires the value parameter as a string or a number (depends on a filter type).

And I have just understood my error. Explain it here, maybe it will help to somebody.
I am trying to set a value in filter in mm. This returns an error.
image

But if I set a value in ft, a schedule filter will be created. Everything works.
4500 mm = 14,76378 ft.
image

So, what’s the maximum number parameter value for schedule filter?
It’s 9144000 mm = 30000 ft.
image

And a very important feature.
A number value must have a fraction or the tailing “.0”.
This is why I have gotten an error, when trying to set “4500”, not “4500 .0”.

Also, the standart input node also returns a number with no fraction. This makes an error too.
image

Updated
The problem is, seems, that the node ScheduleView.AddFilter wants only Double type as a value parameter (when creating a number filter).

Thanks to everyone :smiley_cat::smiley_cat::smiley_cat::smiley_cat::smiley_cat::smiley_cat::smiley_cat::smiley_cat::smiley_cat::smiley_cat::smiley_cat::smiley_cat::smiley_cat::smiley_cat::smiley_cat::smiley_cat::smiley_cat::smiley_cat::smiley_cat::smiley_cat::smiley_cat::smiley_cat::smiley_cat::smiley_cat::smiley_cat::smiley_cat:

3 Likes

So, this is my excuse, that I have been trying to insert the string “1” to a number parameter… At least, it hasn’t returned an error in the node ScheduleView.ByFieldTypeAndValue.
When I was trying to set 4500 it returned an error in this node…
Who knew, that “4500” and “4500.0” in Code Block node results in different variable types. :upside_down_face:

Hi @Kulkul

Can you help me solve this…


Add

Thank you

can star new post. This one already have a solution.

its not Solved!

try like this. Make sure you feeding the correct type of inputs for filters.

1 Like

I’m not asking for Mark…

add1

This is my desire output…
thanks for your consent …

But it will usually work…

try for Category and show me

I will try let you know…