Last Chance To Claim LIFETIME ACCESS. [~20 Seats left]
Resources
May 10, 2024
Revit API Resources You Didn't Know About!
If you ever felt stuck learning Revit API, then you will love these resources.
Revit API is so niche
When we start learning Revit API we realize how little information is out there, or at least that was the issue some years ago. Nowadays, there are actually a lot of resources online that we can leverage to code with Revit API faster and better.
I found it quite surprising, but there are actually so many resources available, that I got lost in them. So I decided to list here all the best resources you didn't know about, so you can start using them and make your life easier.
Before we dive into resources, keep in mind that I couldn't rate them as there are too many of them, so I've just categorized them so it's easier to navigate around and I will also focus on how to find similar resources instead of listing too many of them here...
Let's begin with the basics.
Documentation
I know it sounds boring to explore documentation… But also keep in mind that docs are the most used resources in programming, especially in Revit API. We constantly need to reference different classes, or see a code snippet that we need. Therefore it's important to start here.
Revit API Docs - This is the most used resource in my opinion. You can find all the classes in Revit API, and most importantly, how to use it.
pyRevit Dev Docs - If you are a python coder, then there is a high chance that you use pyRevit. It's super beginner friendly and very easier to get started with. And it has an amazing documentation where you will be able to find a lot of useful resources and code snippets. I highly recommend you to look around it.
Revit Developer's Guide - This one is lesser known resource. At least I missed it for the first couple of years of using Revit API. This is the official guide from Autodesk, and it has certain topics very well explained and documented. Personally, I didn't like the basics in there, but once you start reading about more advanced stuff in Revit API like filtering, IUpdater, Events… This is an amazing resource. I started to often reference it before my tutorials, to see if I missed anything or not.
Dynamo Python Primer - Lastly, Dynamo Primer is a very well known resource. It has a section dedicated to Revit API with python, and there are a few short lessons that can help you get started with Revit API.
E-Books
RevitAPI E-Book: The Beginner’s Guide - If you are a Revit API beginner, I highly recommend you to grab my Beginner's Guide to Revit API. It's a 50 page E-Book where I tried to fit in as much information as possible. It has plenty of explanations, code snippets, links to other video resources and so on. And most importantly it's FREE!
Revit API E-Book: FilteredElementCollector Guide - Another Guide that I've written some time ago, where I did my best to explain everything about FilteredElementCollector and provided a lot of code snippets. It's great when you feel lazy and want to find a snippet for your collector to get the right elements.
As you know, sometimes getting the right elements is half the solution.
pyRevit Extensions
Let's talk a bit more about pyRevit. pyRevit is Open-Source, which is mind blowing!
It means that we can access every single line of code written for this amazing plugin. And not just the plugin, but for every single tool that is run by pyRevit, including additional extensions like EF-Tools, pyRevitMEP, pyRevitPlus and many others… So you should take full advantage of that.
There are 2 ways to get the source code:
1️⃣ ALT + CLICK on a button in Revit, then it will open the source folder where you can find the .py file.
You can install all additional extensions from pyrevit's Extension Menu to test and explore them.
2️⃣ Get source code on the GitHub. All these extensions are hosted on GitHub, so it's very easy to see the code online.
Here are the most popular pyRevit Extensions:
And these are not all of them!
I highly encourage you to open GitHub and search for pyRevit in there:
GitHub/Search/pyRevit
This will give you more than 200 search results. So you will be able to find so many more extensions where you might find the code that you might reuse in your own work!
💡GitHub Pro Tip:
Did you know that you can change github.com…. to github.dev…. and then it will open GitHub repository in the online VS Code IDE, which is a far better way to explore code.
Here is an example how GitHub can look:
GitHub Repositories
Also, since we are already on GitHub, let's also GitHub/Search/Revit API and see what we get. There will be even more repositories with different code samples.
I will list here a few:
Revit API SDK Samples (C#)
Also if you want to look for Revit API samples, you should definitely check Revit API SDK samples. You can download and install SDK from Autodesk Platform Services.
Once you install it you will see these files:
Including a folder with Revit API Samples. Also you can find it on the GitHub for Revit 2021 SDK. These are C# Examples, but still you can find something useful there.
And nowadays, translating C# to Python is not a big deal with all these AI LLM models like ChatGPT, which can easily translate C# to Python with minor errors.
Learn Revit API - Python Snippets
But if you want to have a look at the collection of python scripts for Revit API, check our my python snippets collection here. This is a place where I usually paste my code snippets, when I don't forget about it. There are plenty of very useful snippets, check them out.
Search Code Samples
We can also search for more specific code samples. If we are lucky enough you might be able to find a blog post, youtube video or even ask AI ChatBot and get good results.
But sometimes it's much harder to find what you look for.
For these moments I want to suggest you 2 interesting websites:
These are search engines for the code. So you can write a Revit API class name and it will return you matches found across GitHub. Most importantly you can see it in the context. This way you can find how others already used the class that you are looking for.
Also while you at it, check the repositories where the examples come from. Sometimes you might discover a new repository full of useful code snippets that you could use. Keep an eye on it😉
AI Tools
I've already mentioned AI Tools, but I think they are worth mentioning once more. Our lives have certainly changed since LLM(Large-Language-Models) became a mainstream thing, so we should definitely adapt using them more.
I often experiment with Chat GPT and see how far can it go. But same as you've already experienced it's limited and often gets stuck on bigger problems.
It might be successful to delete all doors in the project (for whatever reason), but once you start adding more steps to your logic, it start to break or hallucinate. Usually it happens on the topics which are not so well documented online, and it can't find the answer anywhere so it just makes up hoping it will work… Just like I did in the University.
Obviously you can use:
It's a bit hard to choose, because often times each of these models can give you better answer than another. And also they improve at different intervals. But there is a place where you can test all common LLMs.
ChatBot Arena
There is an amazing website - ChatBot Arena(https://chat.lmsys.org/)
It's a place where you can test multiple models for free and compare their results. You can either choose random models and see their names after you rate which one is better. Or you can also go to side-by-side arena, where you can specifically select 2 models you want to compare. You can even grab the latest Open AI GPT4-o model and but it against latest Gemini or Lama model.
And the best part? You don't even need to register, you can use all these models in 1 place just by going to the website.
Coding Pair / AI Code Assistants
Also to improve our coding we can use AI Coding Pair (AI Assistant). These are AI models integrated into an IDE. It means that we can ask for its help inside of our code, or even make it write it for us.
There are many options, but from what I've researched, here are the most popular ones:
I can't recommend one over the other for Revit API yet, as I haven't tested them all yet. But it's something that I have on my mind and I will share my findings when it happens!
Forums
If nothing above has helped you, then probably you need some human help. Forums might sound obsolete, but there are still very active forums on such niche topics. Here are the best ones for Revit API:
pyRevit forum
The most active Revit API community in my opinion. You can always ask you question and somebody will try to help you out or share the solution if they have it. Highly recommend you to join it.Autodesk Revit API Forum
Official Revit API forum from Autodesk. Also a great place to go when you are stuck,.DynamoBIM Forum
Alternatively, if you use Revit API inside of Dynamo, or need help with the nodes - there are many people who are willing to help you in this forum.
Blogs
Also, I should mention some blogs. When we have an issue in Revit API - we start googling and then we end up on some random blogs. I still keep doing that and find new blogs, but there are a few that keep popping up in my search:
thebuildingcoder Blog
The OG blog by Jeremy Tammik. You've definitely been there.Danimosite Blog
This is not a very big blog, but I found so much value in it, when I was exploring Coordinate systems in Revit API. So I want to give it a shout-out for that!Learn Revit API Blog
Also you can check my own Revit API Blog. I had some users reach out and thank me that I saved them days of work thanks to certain articles. Hopefully you will find it useful too.BoostYourBIM Blog - Lots of articles about Revit API in C#. Written by Harry Mattison.
Other Learning Resources
Lastly, I want to mention video resources for Revit API. These are more useful and educational, however there are less of them than written posts. But you should still check out and see what you can find.
Search for Revit API in YouTube and find a lot of different videos from multiple channels. Sometimes you can try searching for your specific problem and if you are lucky enough, it can save you days!
Autodesk University: Revit API
Also, make sure you check previous recordings on Autodesk university. I remember when I started I've found a bunch of presentations there that helped me get started. Since then I haven't looked at new ones, but I am sure it has even more cool recordings now!
Take a Shortcut
Lastly, you can take a shortcut in Learning Revit API.
Join Learn Revit API Course.
This course will take you through basics and beyond. Not only you will learn all the theory that you need, but also you will see how to apply it to create a lot of tools together.
This will save you weeks if not months of Learning Revit API and you will have a huge collection of code snippets that you will keep reusing after the course.
This course already has 50+ lessons (~12 hours), and I keep uploading more content, so it will get even bigger.
If you doubt if you should join the Learn Revit API Course - Check Testimonials section.
Don't just take my word for it 😉
Join Newsletter
📩 You will be added to Revit API Newsletter
Join Us!
which is already read by 7200+ people!
Ready to become Revit Hero for your office? Learn Revit API!
Join this comprehensive course that will guide you step by step on how to create your dream tools for Revit that save time.