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
From the course: Revit: Creating C# Plugins
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…
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
-
Retrieving element information6m 39s
-
FilteredElementCollector3m 7s
-
Creating a collector7m 28s
-
Transactions2m 47s
-
Modifying elements5m 30s
-
Creating families7m 54s
-
Querying FilteredElementCollector5m 7s
-
Creating line-based elements6m 55s
-
Creating loop elements5m 59s
-
Get parameter6m 3s
-
Parameter values4m 45s
-
-
-
-
-