From the course: Revit: Creating C# Plugins

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Creating line-based elements

Creating line-based elements

From the course: Revit: Creating C# Plugins

Start my 1-month free trial

Creating line-based elements

- [Instructor] In an earlier video, we learned how to place a family using an insertion point or XYZ. In this video, let's have a look at a different way to place elements such as using lines by creating walls directly in a Revit command. In this file, I've gone ahead and created a PlaceLineElement class which is a new IExternalCommand. Before we start placing walls, let's have a look at how to create one. Switch over to the Object Browser and I'm currently browsing the Custom Component Set which references the RevitAPI and RevitAPIUI files. Within here, I'm going to search for wall and then select the wall class. Here you can see the wall has create methods directly in the wall class as constructors and there are a few different ways that we can create them. Let's use this one that takes four different parameters. This requires the document, a curve, an element ID as the level and a Boolean to determine if it's structural or not. This will create a wall using the curves we provide as…

Contents