Revit

What is the Revit API? Can an engineer with no programming background learn it

What the Revit API is and what it does, Dynamo or C#, how much programming you actually need, a four-stage path for engineers, and who hires for this.

  • Dr. Do Quoc Hoang
  • 9 min read
The Revit API is not a program. It is the door through which code you write drives Revit, instead of clicking Photo: Institute of Information Technology in Civil Engineering

The same situation repeats across design offices. An engineer has to fill in component codes for a few thousand elements in a Revit model. It takes days, and a few always get missed.

Then the model changes. Start again.

This is exactly the kind of work the Revit API exists for. A small tool of a few hundred lines can finish it in under a minute, and repeat it as often as needed.

This article explains the API through the specific jobs it does. It then compares the two routes, Dynamo and C#, is honest about how much programming you need, and sets out a learning path for engineers without a computing background.

What the Revit API is

API stands for Application Programming Interface. Think of it as a door that Autodesk opens so other software — or code you write yourself — can drive Revit.

Through that door, code can read every element in the model. It can edit properties, create new elements, export data, and add commands to the ribbon.

Put simply: almost anything you can do with the mouse, code can do too. Faster, and without missing any of it.

The five most common groups of jobs:

  1. Filling and syncing parameters in bulk. Read material or component codes from a spreadsheet, then apply them to thousands of elements by rule. When the model changes, run it again rather than checking by hand.
  2. Numbering and naming automatically. Number columns, beams, doors, rooms and sheets to the office convention, by grid and by storey. Change the convention and rerun.
  3. Placing elements by rule. Put a sleeve at every point where a pipe passes through a wall or slab. Create views and sheets for each storey and each discipline.
  4. Checking the model against standards. Sweep the whole model for wrong categories, wrong names, missing required parameters, families that are not in the office library. Then export a report. This is a tool a BIM Coordinator uses daily.
  5. Exporting data in your own format. Take quantities from the model straight into the bill template the cost department already uses.

What all five have in common: none of them is "writing a large program". They are small tools that solve one repetitive job. And that is where most of the value of Revit programming sits in practice. It is also what the Institute's Revit API course aims at.

Dynamo or C#

There are two routes through the API door. So the question "Dynamo or the Revit API" is really "Dynamo or C#".

DynamoC# (.NET add-in)
What it isVisual programming. Drag nodes, wire them into a graph. Ships with Revit, free (dynamobim.org)Code written in C# or VB.NET, compiled into an add-in
Programming needed?Not at first. Logical thinking, yesBasic C#
Time to a first resultHoursWeeks
SuitsOne-off automation, testing ideas, data handling, parametric geometryTools used repeatedly, shared across an office, fast on large models
LimitsSlow on large models. Big graphs get hard to maintain and to shareTakes effort to learn and write. Needs recompiling for each Revit release
Who uses itEngineers and architects automating their own workWhoever owns the office BIM tooling

The Institute's advice is simple. Start with Dynamo. Move to C# when a tool has to run many times, or serve many people.

Plenty of engineers stop at Dynamo and that is enough for their work. Those who become the office tool-builder need C#. And they are usually paid on a different scale. The article Dynamo: the complete guide to visual programming for Revit covers the first route in depth: nodes, graphs, packages and the six everyday tasks engineers hand to Dynamo.

How much programming you actually need

This is the biggest worry among civil engineers. The honest answer: less than you think, but not none.

Writing a C# add-in for Revit needs three layers of knowledge.

  • Programming basics. Variables, data types, conditions, loops, functions, lists, classes and objects. A few weeks of serious study. No complex algorithms, no advanced mathematics.
  • The Revit object model. Document, Element, Category, Parameter, Transaction. How to filter elements, how to create and edit them. This is the "Revit" half of the work, and civil engineers pick it up faster than pure programmers, because they understand what a model is.
  • The tooling. Visual Studio, the structure of an add-in, debugging, packaging it so other people can install it.

Here is what you do not need: a computing degree, web or mobile development experience, or the ability to write commercial software.

An engineer's advantage lies elsewhere. They know exactly which problem needs solving. Pure programmers usually write better code, but do not know what is worth automating.

In practice, the person who combines both — understands the model and can write the code — is the scarcest of all.

A learning path for engineers

There is one prerequisite: be fluent in Revit in one discipline. You have built real models and you understand families, types, instances and parameters.

You cannot automate what you cannot yet do by hand. If you are not there yet, work through the Revit learning path first.

Four stages, from Dynamo through C# add-ins to building real tools for an office Photo: Institute of Information Technology in Civil Engineering
StageWhat you learnWhat you end up with
1. Dynamo (2–4 weeks)Interface, core nodes, reading and setting parameters, selecting elements, working with ExcelA graph that automates a real job of yours
2. C# basics (4 weeks)Syntax, data structures, classes and objects, Visual StudioSmall standalone programs
3. C# add-in (6–8 weeks)Add-in structure, the Revit object model, filtering and editing, creating elements, interface, eventsAn add-in with its own ribbon button
4. Real work (ongoing)Building tools people ask for, maintaining them across Revit releasesAn in-house toolset

The Institute's Revit API programming course runs 15 sessions and covers stage 3, for people who already know Revit. It is divided into seven parts. The first four are add-in fundamentals, building a tool interface, referencing elements, and reading their data. The last three are setting properties, creating elements in code, and event programming.

Anyone without C# is guided through stage 2 before the course. If you still work heavily in two dimensions, there is also a 10-session AutoCAD programming course.

One piece of advice on how to learn. Do not study the API function list. Pick the job you most hate doing by hand in Revit, then learn exactly what it takes to automate it.

Your first tool can be ugly. It is proof that you can do it, and it is what an interviewer wants to see.

Who hires for this

Roles involving Revit programming in Vietnam usually go by BIM Developer, Revit API Developer, or BIM tools engineer. Sometimes it sits inside a BIM Manager's job description.

Four groups tend to hire:

  • Construction and BIM software companies. Commercial add-ins, quantity take-off tools, model checking tools.
  • Large design firms and main contractors with a BIM team. They need one or two people writing in-house tools and building libraries and standards, often alongside a coordinator or manager role.
  • BIM outsourcing companies serving overseas clients. Productivity decides margin, so automation gets real investment. C# and English required.
  • Research and software units in universities and institutes. Such as the software development centre within the Institute itself, building applications commissioned by companies.

Someone who understands the model and can write add-ins usually earns more than a modeller with the same years of experience. The reason is simply that there are very few of them. For an engineer who wants to earn more without leaving the technical side, this is one of the few routes that does not require moving into management.

Frequently asked questions

Do I need English to program for Revit?

You need to read it, because the documentation, the function names and the question-and-answer communities are all in English. You do not need to speak it well.

Is Dynamo enough to get a job?

Enough for a BIM engineer automating their own work, and a plus in any application. Roles building tools for a whole office usually ask for C#.

C# or Python?

The official Revit API is .NET, meaning C# or VB.NET. Python works through Dynamo or pyRevit and is very handy for small jobs. But add-ins distributed across an office are still mostly C#. Learn C# first; Python comes quickly afterwards.

Does every new Revit release mean rewriting the tool?

Usually just recompiling and fixing the few places where the API changed. Autodesk publishes the change list each year. That is why maintaining tools is a long-term role, not a one-off task.

Can architects learn to program for Revit?

Yes. Many go the Dynamo route to parameterise massing and facades, and some move on to C#. The condition is the same as for engineers: be solid in Revit first.

Does Revit API work transfer to other software?

It does. The way you think about an object model — filtering, editing, creating elements — is common ground. Someone who has written Revit add-ins picks up AutoCAD or Tekla programming far faster than starting from scratch.

About the author

Dr. Do Quoc Hoang — Deputy Director of the Institute of Information Technology in Civil Engineering, a specialist in software development for construction