The RevitPythonShell adds an IronPython interpreter to Autodesk Revit and Vasari.
The RevitPythonShell (RPS) lets you to write plugins for Revit in Python, my favourite scripting language! But even better, it provides you with an interactive shell that lets you see the results of your code as you type it. This is great for exploring the Revit API while writing your Revit Addins - use this in combination with the RevitLookup database exploration tool to become a Revit API Ninja :)
- interactive IronPython interpreter for exploring the API
- with syntax highlighting
- autocompletion (press CTRL+SPACE after a period)
- based on the IronLab project
- batteries included! (Python standard library is bundled as a resource in the
RpsRuntime.dll
) - full access to the .NET framework and the Revit API
- configurable "environment" variables that can be used in your scripts
- save "external scripts" for reuse and start collecting your awesome hacks!
- run scripts at Revit startup
- deploy scripts as standalone Revit Addins
lookup()
function for snoopingElement
,ElementSet
andElementId
objects in RevitLookup
- Installer for Autodesk Revit 2020
- Installer for Autodesk Revit 2019
- Installer for Autodesk Revit 2018 (and 2018.1)
- Installer for Autodesk Revit 2017
Older versions:
- Installer for Autodesk Revit 2016
- Installer for Autodesk Revit 2015
- Installer for Autodesk Revit 2015
- Installer for Autodesk Revit 2014
- Installer for Autodesk Revit 2013
- Installer for Autodesk Vasari (Beta 3)
- Issue Tracker: https://github.com/architecture-building-systems/revitpythonshell/issues
- Source Code: https://github.com/architecture-building-systems/revitpythonshell
- RevitPythonShell discussion group
- stackoverflow (Note: use the
revit
,revit-api
andrevitpythonshell
tags) - read up on How To Ask Questions The Smart Way first
Learn some python:
Learn about the Revit API:
Tutorials recommended by the community:
- Mono IronPython Winforms Tutorial - recommended by Callum
You can find sample scripts here:
- Sample RPS Scripts on GitHub
- feel free to send me your own scripts for inclusion!
- Nathan's Revit API Notebook using the RevitPythonShell
- Nathan Miller even has a Mobius Surface for Vasari sample
- dp stuff (Python Scripts Archives)
- lots of scripts
- my own blog contains the odd sample script
- Check out pyRevit by Ehsan Iran-Nejad - it includes a library of interesting scripts and some additions to make writing your own easier!
This project is licensed under the terms of the MIT License.
- Daren Thomas (original version, maintainer)
- Zachary Kron (original port to Vasari)
- Akimitsu Hogge (original port to Vasari)
- Joe Moorhouse (interactive shell was taken from his project IronLab)
- Jason Schaeffer (port to Revit 2011)
- Ehsan Iran-Nejad (@eirannejad) countless improvements, the awesome pyRevit tool and a special thanks for helping maintain RPS!
- @DanRumery improved autocompletion with PR #59
- Petr Mitev (@mitevpi) ported to Revit 2019 with RP #86
- Alvaro Ortega Pickmans (@alvpickmans) refactor to sdk csproject and release for Revit 2020 PR #101
- @hdm-dt-fb added
set_font_sizes
function for presenting RPS (PR #77) - many, many users with questions, bug reports etc!
Also, many thanks to the Chair for Architecture & Building Systems for making this project possible.
NOTE: If you are not on this list, but believe you should be, please contact me!