Announcements
Due to scheduled maintenance, the Autodesk Community will be inaccessible from 10:00PM PDT on Oct 16th for approximately 1 hour. We appreciate your patience during this time.
Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get FilterElement Elements

2 REPLIES 2
Reply
Message 1 of 3
lezsoft
417 Views, 2 Replies

Get FilterElement Elements

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?

2 REPLIES 2
Message 2 of 3
MattKincaid
in reply to: lezsoft

Use FilteredElementCollector.ToElements

Message 3 of 3
RPTHOMAS108
in reply to: lezsoft

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.

Post to forums  

Rail Community


Autodesk Design & Make Report