Category Parameter used in FilterRule.ByRuleType

I am trying to make a script that can take an excel file of filters and push it into Dynamo. The only part I am stuck on is getting the parameter input for the node FilterRule.ByRuleType. When using the filter window in Revit, you get to choose the category, and then choose the filter rule using parameters based on the category.

Is there a way to replicate this in Dynamo? Categories have no parameters attached to it directly and I would like to avoid needing to find an element of that category because some categories will only be in linked files. Ideally, I would only need the category and a parameter name to find the Parameter object.


There is a list of builtin parameters with its associated GUID’s on the net.
Would a workflow getting these GUID’s and therefore their Categories help?

Thank you for the reply.
Would that be like backtracking after getting all of the GUID’s? I guess it depends on what their string name and category name are exactly, as I was hoping to use the names Revit uses inside the window for easy set up. I know that Revit tends to use a different way to call builtin parameters, things like all-caps abbreviations with underscores.

Anyone have any clues? This is the last part I need to finish this script.

I have the categories but I don’t have a good way of finding a parameter object by name that is associated with that category.

@Kulkul any chance you could take a look at this? Barring having to make a blank element of each category that contains all the types of parameters, I have 0 ideas.

You want to find parameter object with category and parameter name as input?

Yes. But it also needs to account for categories where there are no elements of it inside the project, because they might be in a linked project. I’ve been trying with FilteredElementCollector and other API methods but can’t find a method that is working.

What is the name of parameter object and category you want to get it from linked file?

Ideally, any. The goal is to make an excel doc that we can set up sheets of filters based on disciplines that has all of the info in it. That way, we can use the excel to add/remove filters to multiple projects at the same time. It would be better than applying view templates as it does not completely remove all filters but just adds a set of them on top. This is my excel doc so far (.xlsm - macro-enabled excels - are not attachable on this forum):

.dyn - fromExcel.dyn (55.4 KB)