From the course: Revit: Creating C# Plugins

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Creating loop elements

Creating loop elements

- [Instructor] Any Revit element that is created using a closed loop in sketch mode, such as floors and roofs, are done so using Revit types that contain collections of curves, such as curve loops and curve arrays in the API. So let's have a look at how to create a new floor in Revit using these types. In this file, I've gone ahead and created the place loop element class which is a new I-external command. This is based off the last exercise in which we used curves to create some walls. Let's now use these to create a new floor. In the object browser, go ahead and search for new floor. These are three different methods we can use to create a floor. You might be wondering why these aren't in the floor class. This is a bit of a quirk of the Revit API in which some creation methods are found in the Creation.Document namespace from when the first Revit API was released. Let's use this simple method that takes a curve array and a boolean to create a floor. A curve array is simply a Revit…

Contents