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.
The IExternalCommand
- [Instructor] To create our first Revit plug-in command, we're creating what is called an external command. External commands are essentially exposed objects that implement the IExternal Command interface. They, in turn, become commands in Revit that can access the Revit database and selected elements. If you haven't heard the term interface before, this is a type in Csharp that contains related members such as methods and properties that can be implemented by a class or strut. When we compile our code into a DLL or dynamic link library, Revit will rate this DLL and any IExternal command classes we create, will be added on to the Revit interface under the add-ins tab to then be executed. Provided it utilizes the IExternal command interface correctly. And it is described in a manifest file, which we'll learn about later. The IExternal command interface has one method, execute. Which needs to be defined in the command class. This will run when the command is pressed in Revit. When a…
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
-
-
-
The Revit API2m 18s
-
(Locked)
Viewing the Revit API3m 33s
-
(Locked)
Setting up Visual Studio4m 34s
-
(Locked)
Adding the API4m 48s
-
(Locked)
The IExternalCommand3m 10s
-
(Locked)
Creating a command4m 16s
-
(Locked)
Accessing the application2m 48s
-
(Locked)
Selecting elements4m 58s
-
(Locked)
Registering add-ins5m 38s
-
(Locked)
Compiling the code5m 17s
-
(Locked)
Debugging4m 49s
-
-
-
-
-
-