I’m trying to make a view template that includes a newly create filter to hide all views that don’t include a text string in an office standard shared parameter called “view folder-BRIC”. I’d like to be able to input the Text String, so I can quickly make a version for each user who joins the project so their views can hide other user views. I’m getting very stumped with the node
ParameterFilterElements.ByRules, but I think it’s actually related to the node FilterRule.ByRuleType not outputting anything. I’m at a loss, everything seems setup to match data types and I can’t find anything on the forums that seem to address this. I’m not really sophisticated enough to tackle it in Python without some painful vibecoding, but it seems like the Dynamo nodes should be function?
I noticed that the Parameter.ParameterByName was included the value (it’s blank in the below image, but the : shows it’s also include the parameter and value), so I double checked in a few ways that it was in fact grabbing a parameter element (that’s all the watch and ID nodes at the bottom).
Hi there. That’s weird why it doesn’t work. Please send a graph image with results previews pinned for each node. It would be much easier to understand what’s gone wrong
See below. I swapped which view is used as the Parameter.ParameterByName just to show the results are the same whether the input is a legend or drafting view, both output the same parameter export (see original post for the one with a legend as the input).
Yes, that null value is why I’m confused and my guess as the source of the issue. The FilterRule.ByRuleType requires inputs of String, value of type Var to check against, and Parameter. I used the autogenerated inputs to create the input nodes. I don’t know what a “Var” type is, but other graphs I’ve seen online worked with a string input so this is what I used, and a string input is what the node requests when using the auto create function.
Looking at the code, currently it appears that the FilterRule.ByRuleType is limited to the following filters (see below) as the code does not seem to work for other rule types when I test.
I would have to look at the API further, but I think select rule type surfaces a bunch of different rule types for different filters in the Revit API. This would be view filters, parameter filters, filtered element collection filters, all those different kinds.