View.SetFilterOverrides Does not take Legend Views

Hello all,

I am trying to use View.SetFilterOverrides to add a filter to every view where an item occurs. The element occurs in some of our legend views but I cannot pass a legend view to View.SetFilterOverrides. Has anyone delt with this before?

The warning is “Warning: No function called SetFilterOverrides on a Revit.Elements.Element that takes ParameterFilterElement,OverrideGraphicSettings,bool could be found”

Thanks,

I think Dynamo doesn’t support Legend views. There are a handful of members in the API’s ViewType Enumeration that Dynamo sees as Revit.Elements.UnknownElement… from what I can tell their commonalities are that they do not have their own Class or belong to a class but I’m not sure if that is the explanation as to why. I looked into this a little while ago when I discovered area plans were not supported; I can’t remember if I was given an explanation of why they aren’t, but I tried investigating the cause and noticed that Legend views aren’t as well.

Sort of my explanation/reasoning below… I didn’t go through the effort of making every single type of possible view to test, but the Watch node labeled “ViewTypes that are Revit.Elements.UnknownElement” is a list of view types that I would assume are not supported by Dynamo because they come up as unknown elements:

Apologies if I’m completely wrong about this :sweat_smile: I think I had tried a couple of other view related nodes with Legend views after I noticed the “UnknownElement” thing and they didn’t work, though.

2 Likes