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.

Creating a command

Creating a command

From the course: Revit: Creating C# Plugins

Start my 1-month free trial

Creating a command

- [Speaker] Now that we understand what an I external command is. Let's use this class to create a command in our project file. I'm continuing on where we left off in video four of this section. If you don't have it opened, you can find it in the exercise folder for this video. The command that we'll be creating will allow us to select an element and retrieve its element ID. So let's start by renaming the class we made in the previous video so that it would describe the command that it's going to perform. In the solution explorer on the right, we can rename the class by right clicking the object and clicking rename. I'm going to call mine, get element ID. And hit enter. And then as we want to update all references to class one, I'm going to click yes. Great, so let's start by implementing the I external command interface. To do that, we simply add a colon after our class name and then the interface which is I external command. You can see that it's popped up in the IntelliSense. This…

Contents