Hi everyone...
I need to select all elements of a specified filter, created by the user in Revit (the ones you see in Visibility/Graphic Overrides -> Filters).
I got all documents' filters using
FilteredElementCollector(myDoc).OfClass(typeOf(FilterElement))
but now I can't understand how can I get connected elements from a FilterElement because there isn't a propriety or a method to do that in FilterElement class.
Can someone help me?
I believe you are asking if there is a way to understand what Elements are affected by a FilterElement?
FilterElement is the base class for:
ParameterFilterElement & SelectionFilterElement.
Therefore, once you have cast to one of those types above you can use the below as appropriate:
ParameterFilterElement.GetElementFilter that will return a ElementFilter that can be used with a FilteredElementCollector.
Or
SelectionFilterElement.GetElementIds that will return a collection of ElementIds
Can't find what you're looking for? Ask the community or share your knowledge.