Setting up Revit API Development Environment in vs code .
Download and install the PyRevit setup from the link below. pyRevit helps you quickly sketch out your automation and addon ideas, inside the Revit environment and using its APIs.
https://github.com/eirannejad/pyRevit/releases
Download and install Revit lookup. From the link below based on your primary Revit version, download the zip file and install. Revit Lookup add-in allows you to explore and navigate the Revit BIM Database
https://github.com/jeremytammik/RevitLookup
Download and install Revit Python shell. From the link below, choose and download the installation link based on your version. It provides an interactive shell, allowing you to interact with Revit using Python in realtime.
https://github.com/architecture-building-systems/revitpythonshell
Install the VScode editor if you have not installed it yet.
Install ironPython 2.7 from the link below. IronPython 2.7 is tightly integrated with the .NET framework allowing you to use .NET and Python libraries
Install Visual Studio if you would like to install Windows GUI. Make sure to select both Python and NET frameworks during the installation process.
https://visualstudio.microsoft.com/. This allows you to develop GUI for your plug-ins.
Install Github. This will allow you to progressively save your work in the cloud. https://git-scm.com/download/win
Create a new directory. A placeholder for your plug-in project
Create a virtual environment with a base interpreter as Python 2.7 within your new directory.
Download gtalrico's github repo "ironpython-stubs" : This will be used by Autocomplete engine for common language runtimes(CLR).
https://github.com/gtalarico/ironpython-stubs
Extract the contents of " ironpython-stubs-master". Go to ironpython-stubs-master> release > and copy "stubs-min" folder. Paste the folder to your project folder > venv
-
Set up the Autocomplete Revit intellisense for vs code by following the following video by Macro4Bim
Final output. You can now interact with Autodesk classes and Pyrevit
Subscribe to my newsletter
Read articles from Symon Kipkemei directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Symon Kipkemei
Symon Kipkemei
I am a BIM Developer & Architect with a passion for efficiency, sustainable development, and innovation in design. Active BIM community member & a lifetime student.