Hi All,
I’m trying to create a basic view filter, as per the below:
I’ve tried this using 3 various approaches: OOTB, Archi-lab & Bakery as shown below:
None of the methods are producing a View Filter…
The OOTB approach gives me the following error message:
Warning: ParameterFilterElement.ByRules operation failed.
One of the given rules refers to a parameter that does not apply to this filter’s categories.
Parameter name: elementFilter
The Archilab approach gives me:
Warning: ViewFilter.CreateFilter operation failed.
Method not found: ‘Void Autodesk.Revit.DB.ParameterFilterElement.SetRules(System.Collections.Generic.IList`1<Autodesk.Revit.DB.FilterRule>)’.
And the Bakery method gives me a null.
I have a feeling it’s the Parameter Name input which is giving me trouble…
I’ve tried to snoop the properties of the floor to determine what the parameter name I’m trying to filter is, and from what I can gather, it is “Name” (see below),
however when I search for BuiltInParameter.ByName the closest thing I can find is ELEM_TYPE_PARAM…
Can anybody point out where i’m going wrong in my approach? I feel like i’ve tried this every which way over the last 24 hours to no avail…
Thanks.
Script: View Filters_.dyn (61.3 KB)
EDIT: Also tried the approach below:
But i am getting the following error message:
Warning: ParameterFilterElement.ByRules operation failed.
One of the given rules refers to a parameter that does not apply to this filter’s categories.
Parameter name: elementFilter