I just stumbled on this script library for Revit users who wish to use Python with the Revit API. In it’s simplest form, it’s a folder of IronPython
.py scripts for Autodesk Revit.
Check it out on GitHub: https://github.com/eirannejad/pyRevit
There is plenty of example code written in Python that you can refer to when learning to create macros or add-ins for Revit.
To use Python with Revit, you will need to install a few things:
I don’t want to get into too much detail on how to use Python with Revit in this post, but if you need help getting started, there is a very helpful guide on Productspec.
- Iron Python: http://ironpython.net/download/
- RevitPythonShell: https://code.google.com/p/revitpythonshell/
- Revit Software Development Kit: http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=2484975