LearnRevitAPI

👉Your shortcut to mastering FilteredElementCollector in Revit API

Aug 13, 2025

👉 Master Getting Elements

Getting the right elements is half the solution.

And it's not complicated. However, beginners tend to make it harder for themselves, especially if they just start.

So let me show you how simple it is to create a collector and filter the right elements

You're about to become a Revit API Hoarder.

How does Collector Work?

As you've seen inside Revit Lookup, Revit is like a database that contains all our elements and their properties. And like any database, we can query information with filters.

And that's where FilteredElementCollector(FEC) comes in. You need to create a collector and then apply a set of filters to get the right elements from your project.

Also it can look a bit confusing seeing it work for the first time, but I promise it's one of the easiest classes to work because of how repetitive it is.

Here is the Anatomy of how it's used:

This is the most typical way of getting elements with FEC.
In a nutshell:

  1. You create collector with your doc (Project)

  2. Then filter by Class or Category (or both)

  3. Then you filter Instances or Types

  4. And you convert to a list of Elements or Element Ids

Now not so complicated, huh?


Revit API is Repetitive

FilteredElementCollector is easier than it looks!

I know it might be confusing to see that loooong line of code for the first time. However, it's one of the most repetitive classes.

👀 Have a look at examples below:

Notice that it almost stays the same!

We just need to make minor changes to this line of code to get different category or to get types instead of instances.

And that's why it's one of the easiest classes to use. You just need to use it a few times to get used to that.


More FEC Examples

The best way to learn about FEC class is to see a lot of examples and then copy a few yourself.

So, have a look at even more examples of using FEC and compare the code when you get different elements.


Video Tutorial

If you want to learn more about FilteredElementCollectors, I recommend you watch this video where I will break it down and provide even more code examples.

📙Bonus E-Book

On top of that I've written an ebook specifically about FilteredElementCollectors and Revit API Filters to help you even more. It's full of code samples.

It has thousand downloads and it helped a lot of people to start using it right away.

👉 You can grab it here.


P.S.

There are 2 ways to apply filters to the collector.

  • Use collector Methods (easy)

  • Create custom Revit API Filters (more advanced)

At first just focus on using regular methods and filter using python. But if you want to get into Revit API Filters, make sure you check the next newsletter, where I'll talk more about them.

✌️See Ya!

Enjoyed Newsletter?

Leave a Testimonial Here.

⌨️ Happy Coding!
Erik Frits

Join Newsletter

📩 You will be added to Revit API Newsletter

Join Us!

which is already read by 9500+ people!