LearnRevitAPI

Prepare Dev Environment

Nov 13, 2022

Before you start doing anything we need to prepare for the task.
Make sure you have a Development Environment set up with all the necessary tools installed to enable you to use Revit API with Python.
“If I had six hours to chop down a tree, I'd spend the first four hours sharpening the axe.” Abraham Lincoln.
You heard the man.
Revit Add-ins:
These are 3 essential plugins for Revit that we will need to install before we can begin developing tools with python. They are all FREE and have simple installers.
There is a link below to a video to help you installing everything.

pyRevit
pyRevit is the King of Revit Add-Ins. It allows us to create our Extension tab simpler than ever!
And on top of that you get access to many Free Open-Source extensions incl. my own EF-Tools
✅ Download

Revit LookUp
This will allow to look behind the scenes into Revit Elements to see what is available and what values it is going to return. I haven't written a single tool without using it.
✅ Download

RevitPythonShell (optional)
This is interactive shell where you can write your whole scripts. But I found it most useful for debugging purposes and to learn more about certain classes and methods of Revit API.
Python Environment:
Since we will be coding in python we need to downlaod
python IDE and setup RevitAPI Autocomplete.

python 2.7.18
RevitAPI is built on .NET Framework and to use its classes we need a version of python that can refference them. pyRevit is using IronPython but python 2.7 has the same syntax and will be sufficient.

pyCharm (IDE)
Text editor is not enough when you want to develop your own plugins. pyCharm has a FREE version and it is very powerful IDE for working with python.
✅ Download

RevitAPI Autocomplete
Using RevitAPI without any experience is hard and Autocomplete is going to help you a lot. Otherwise a simple misspelling will result in an error.
🎦Video: Setup RevitAPI Autocomplete in pyCharm

GitHub Desktop (optional)
If you want to secure your work online and have a history of your changes you need to use Git. It also allows you to share your extension with others.
✅ Download
🎦Video: Host pyRevit extension on GitHub
Resources for python + RevitAPI
Documentation is your best friend when you just starting.
You can find there a lot more answers than you think,
so feel free to explore as much as possible to get
an idea what is there.

Revitapidocs.com
Online documentation of all RevitAPI Classes. You can see what is possible to do with different classes and how to use them properly.
👉 Link

pyRevit Dev docs
pyRevit has a well written documentation that can help you use it to its full potential. There are lots of examples that you can copy paste. Check it out.
👉 Link
Video Tutorials
If you need help installing and configuring everything
reference my videos that will show you all the steps.
👇

Setup RevitAPI Development Environment

Join Newsletter
📩 You will be added to Revit API Newsletter
Join Us!
which is already read by 7500+ people!




