Kamil Korus

FilteredElementsCollector: Getting elements with Revit API

FilteredElementCollector allows you to access all kinds of Elements in Revit projects – model elements, families, geometries, views – based on specific criteria. Long chains of FilteredElementCollector methods can be daunting. But don’t worry – breaking them down clarifies a lot. Actually, most cases can be resolved with the image below. πŸ“Œ TLDR – Summary […]

Inserting Families with Revit API

You can insert families programmatically at points, on faces or lines, or create hosted families. Inserting Families is the core of creating Revit Elements – and a must-know for Revit plugin developers.Β  In this post: code, examples, and everything you need to know about Inserting Families. πŸ“Œ TLDR – Summary Upfront: To insert Families programmatically:

Transactions: required to modify Revit projects with API

Your code can’t modify Revit projects without a Transaction. Knowing how to use transactions can save you from frustrating code-breaking errors. In this post: code, examples, and everything you need to know about Transactions. πŸ“Œ TLDR – Summary Upfront: Use the Transaction class when your code modifies Revit projects (e.g., create or edit elements). ➑️

Selecting Elements in Revit API

Selecting elements or geometries is a common requirement in Revit plugins. You might need users to select objects for various purposes: elements for further processing, points for placing families, or surfaces for calculations. All of that is possible by knowing the Selection class. Accessing the Selection class The Selection class (from Autodesk.Revit.UI.Selection) is a gateway

Revit Plugin types

Revit provides three options for plugin types: Command, Application, and DBApplication. They behave differently and appear in different places in the Revit menu. Command (IExternalCommand) The Command is the simplest type of Revit plugin. Think of it as a single method for a specific task (e.g., renumbering views, organizing sheets, or placing multiple elements with