Revit: Creating C# Plugins
3h 34mIntermediate2018-11-07
Authors

Jeremy Graham
Registered Architect
Course details
Autodesk Revit is a powerful BIM platform, but it can be automated, customized, and expanded even further with plugins. With the Revit application programming interface (API) and an understanding of C#, any motivated Revit user, BIM manager, architect, or engineer can create their own custom plugins. This training course starts with an overview of the plugin development workflow, using a simple example that retrieves an element ID. Once you know how to create commands and compile and debug the plugin code, instructor Jeremy Graham shows you how to work with elements (aka Revit families). Learn how to create elements, filter elements, and get and set element parameters. Then find out how to edit element geometry through code—binding intersections and projecting arrays—and automate common tasks related to views and sheets. Finally, Jeremy shows an advanced way to execute your commands with custom user interfaces known as external applications.
Learning objectives
Setting up the Revit API in Visual Studio
Creating commands
Compiling and debugging code
Creating elements
Editing element parameters
Editing element geometry
Automating element-related tasks
Creating external applications to execute plugins
Learning objectives
Setting up the Revit API in Visual Studio
Creating commands
Compiling and debugging code
Creating elements
Editing element parameters
Editing element geometry
Automating element-related tasks
Creating external applications to execute plugins
Skills covered
C#RevitArchitectural VisualizationCivil EngineeringAutodesk3D ModelingVisualization and Real-TimeAECProduct and ManufacturingAnimation and IllustrationProgramming LanguagesMicrosoftSoftware DevelopmentDeep Dive (X:Y)
Concepts
Introduction
- Getting started
- What you should know
- Using the exercise files
Creating a Simple Plugin
- The Revit API
- Viewing the Revit API
- Setting up Visual Studio
- Adding the API
- The IExternalCommand
- Creating a command
- Accessing the application
- Selecting elements
- Registering add-ins
- Compiling the code
- Debugging
Working with Revit Elements
- Classifying elements
- Retrieving element information
- FilteredElementCollector
- Creating a collector
- Transactions
- Modifying elements
- Creating families
- Querying FilteredElementCollector
- Creating line-based elements
- Creating loop elements
- Get parameter
- Parameter values
Element Geometry or Editing Elements
- Element locations
- Editing methods
- Revit geometry basics
- Traversing geometry
- Intersecting geometry
- Projecting rays
Automating Elements
- Views
- Filters
- Tagging elements
- Sheets
- Placing views
Advanced
- External applications
- Creating an IExternalApplication
- Customizing the user interface
- Adding icons
- DBApplication and events
- Registering the event
Conclusion
- Next steps