Learn to program the Revit API by Boost Your BIM
4.1 (160 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
648 students enrolled

Learn to program the Revit API by Boost Your BIM

Learn how to customize, automate, and improve Autodesk Revit software.
4.1 (160 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
648 students enrolled
Created by Harry Mattison
Last updated 3/2019
English
English [Auto-generated], Indonesian [Auto-generated], 3 more
  • Polish [Auto-generated]
  • Romanian [Auto-generated]
  • Thai [Auto-generated]
Price: $194.99
30-Day Money-Back Guarantee
This course includes
  • 6.5 hours on-demand video
  • 3 articles
  • 58 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to Udemy's top 3,000+ courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • In this course, you will learn how to write Revit API code in the C# language to perform a wide variety of tasks.
Description

This course is for people who want to do more with the Autodesk Revit building information modeling software.

You can do a lot of great things with Revit as it ships "out of the box" from Autodesk, but there are still many tasks that are repetitive, boring, and error-prone. There are also many situations where you can be more effective and productive if you can add additional functionality to Revit.

This course will cover a wide range of topics in the Revit API. Each topic will be taught by walking through a set of C# code samples that progress from the basics to more advanced concepts.

More content will be added to this new course in the upcoming weeks. If you see a topic that you like added, just let me know and I will try to make that addition.

Who this course is for:
  • Revit users who want to do more with Revit.
  • No programming experience is needed. Novice programmers may find it helpful to supplement this course with some of the many free resources online.
Course content
Expand all 47 lectures 06:28:13
+ Revit API Basics
11 lectures 01:48:11

Prompt the user to select an element and retrieve data from that element.

The "Exception Handling" lecture is recommended to learn how to handle the user pushing the ESC key during a selection prompt.

Prompt user to select an element & get element info
06:56
Prompt user to select edge or face & get edge/face info
07:18

Get the elements selected in the Revit UI and use the API to set which elements are selected.

Selection - getting and setting selected elements
08:28

Find elements in a Revit model using filters by Class (such as Wall or FamilyInstance) and Category (such as Door and Window)

Find Elements - FilteredElementCollector #1
14:59

Find elements that are visible in a specific view.

Find elements whose bounding box is inside a 3D space defined by two mouse-clicks

Find Elements - FilteredElementCollector #2
15:01

Use LINQ (Language-Integrated Query) syntax to develop more sophisticated queries of elements in the Revit model

Find Elements - LINQ queries
06:37
Find Drafting Views that contain a CAD Link
11:40

Create an external command using Visual Studio Express

Create an External Command
06:41

Create family types, family parameters, and set parameter values

Family Types and Parameters
08:55

Get the length of multiple selected lines and convert their total length from feet (Revit's internal units for length) to the project's units

Get Line Length and Convert Units
16:08
+ .NET, C# and general programming basics
8 lectures 01:19:47

Revit macros to read and write text files

Preview 14:09

Find the TEMP folder and the My Documents folder, combine folder and file names, and find all files in a folder.

Preview 07:45

Read data from Excel into a Revit API external command

Read from Excel into a Revit API external command
12:31

How to write Revit data to an Excel file in a Revit API external command.

Includes using the Process.Start command to open a file in its default application.

You can get the EPPlus component for Excel read/write with NuGet (https://www.nuget.org/)

"An essential tool for any modern development platform is a mechanism through which developers can create, share, and consume useful code. Often such code is bundled into "packages" that contain compiled code (as DLLs) along with other content needed in the projects that consume these packages.

For .NET (including .NET Core), the Microsoft-supported mechanism for sharing code is NuGet, which defines how packages for .NET are created, hosted, and consumed, and provides the tools for each of those roles."

In Visual Studio go to Tools - NuGet Package Manager - Manage NuGet Packages for Solution - then browse for EPPlus. Select EPPlus by Jan Kallman

Or you can download the DLL from https://drive.google.com/file/d/1q1ZnRpK4XLdstVzbK3oUc0Qf61-3kLIA/view?usp=sharing or attached to this lecture. If you do that, be sure to unblock the DLL (right click on it in Windows Explorer, select Properties, Unblock) after downloading it.


Write Revit data to Excel
06:45

How to handle exceptions (errors) that occur while running your Revit API code.

Exception Handling
07:35

How to write and reuse functions that make your code easier to update and maintain with fewer bugs.

Code Reuse and Helper Functions
13:57

What it means when a member of the Revit API is marked "obsolete"

Obsolete Members
02:33

Create a Windows Form dialog to allow the user to enter information that will be used by an API command

Creating Windows Forms for User Input
14:32
+ Element Operations
10 lectures 01:20:00

How to modify the Revit Document and delete an element

Delete an element - Intro to modifying the document
06:53

Create a text note

Create text note and get and set parameter values
13:10

How to check the type of a parameter (string, integer, double, element id) and set its value

Set parameter value & Check parameter storage type
06:45

Get data from a Revit element using Built In Parameters

Built in parameters
04:48
Collecting element area and keynote properties
12:33
Create wall
04:05

How to create a Furniture family instance

Create Family Instance (Furniture)
09:49
Create Family Instance (Door)
10:53
Element Rotation
05:10
Get Workset of an element
05:54
+ Element Geometry
3 lectures 31:02

Find the point or curve that defines the location of an element

Element Location - LocationCurve & LocationPoint
12:43

Find area of faces of walls, floors, roofs, and other host objects.

Watch "Code Reuse" lecture to learn how to improve the code shown here.

Get geometry of host faces
09:14
Get Curves and Solids of an element
09:05
+ Debugging Revit API Code
2 lectures 12:13

Step Into a Macro to debug your macro code. Set breakpoints and create watches in SharpDevelop to see what is happening as your code executes.

Step Into a Macro
05:46
Debugging external commands in Visual Studio
06:27
+ Intermediate / Advanced topics
8 lectures 01:14:46
Set Project Units
08:07

How to prompt the user for a selection and only allow selection of specific categories

Selection Filters
12:14

How to register an event to automatically run Revit API code when specific actions occur in the Revit session.

The DocumentSaving event is demonstrated in this lecture to show how to create and update a log file with the time of save and the user's name.

Events
11:30

Create a ribbon tab, panels, and buttons with an external application

Ribbon UI - tab, panels, buttons
10:33
Write comments to the journal file
03:01

Store data in Revit elements that is accessible only via the Revit API

Extensible Storage
13:19

How to "see" in the Revit model by shooting imaginary arrows and finding out what they hit

Reference Intersector
08:21

How your API code can automatically react to user changes in the Revit model

Dynamic Model Update
07:41
+ Source Code from BoostYourBIM blog posts
2 lectures 00:00

See this in action at http://youtu.be/dY9g4MATRG0

Get Categories & Materials from multiple Revit families
1 page

See this in action at http://youtu.be/VKT0_wBAdiY

Record view creation date in a shared parameter
1 page
+ Responses to Questions
3 lectures 00:10

This "lecture" will contain code samples to answer questions. This is being done because code formatting does not display properly in the Udemy Q&A interface.

Code Samples
00:00
File Version Check
00:05
Topo From Lines
00:04