From the course: Revit: Creating C# Plugins
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Querying FilteredElementCollector
From the course: Revit: Creating C# Plugins
Querying FilteredElementCollector
- [Instructor] Before we continue learning how to create elements, I'd like to take another look at the filtered element collector to learn how to make them more concise through LINQ extensions and lambda expressions. If you have not used LINQ, or Language-Integrated Query before, it is simply a feature of C sharp that allows us to query different data sources and filter the results. This is done using the from, where, and select query operators. For example, from x in data source where x equals some function, select x. So it allows us to filter through data sources using different functions. While we won't be creating LINQ queries in this video, we will be using LINQ extension methods. Extension methods are methods added to an existing object type. LINQ extension methods allows us to add query functionality to existing C sharp IEnumerable types such as a list or the filtered element collector. Extensions include many different methods, such as first to get the first item in a list…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Classifying elements5m 22s
-
(Locked)
Retrieving element information6m 39s
-
(Locked)
FilteredElementCollector3m 7s
-
(Locked)
Creating a collector7m 28s
-
(Locked)
Transactions2m 47s
-
(Locked)
Modifying elements5m 30s
-
(Locked)
Creating families7m 54s
-
(Locked)
Querying FilteredElementCollector5m 7s
-
(Locked)
Creating line-based elements6m 55s
-
(Locked)
Creating loop elements5m 59s
-
(Locked)
Get parameter6m 3s
-
(Locked)
Parameter values4m 45s
-
-
-
-
-