Revit + Python

Tagpython

Revit API – ModelPathUtils

R

Chances are, at some point in your Pythonic exploration of Revit, you’ll need to interact with file names and/or paths. Whether this is to open or save a file, or to strip information from a file to enter into a database, it’s important to understand how Revit expects Model Paths to be handled. This brings us to ModelPathUtils.ModelPathUtils Constructors:  There are no Constructors...

Revit API – TRANSACTION

R

Most commands in Revit require some kind of modification to the file you are working in.  If that’s the case, chances are good that you’re going to need to access the Transaction Class within the Revit API.  This is a relatively straight-forward class to use, but it’s worth diving into a little bit to head off any potential problems in using it. Transaction Constructors:  There are two...

Revit API – Filteredelementcollector

R

One of the Revit API commands that seems to show up the most in Python scripts is the FilteredElementCollector Class.  This is the basic command that will allow you to collect objects of various types within a Revit model to then filter to the set of objects or individual object with which you want to interact.  Initially, I found this command to be somewhat confusing because there are a number...

Revit / Python Resources

R

Creating Python scripts for Revit can, at first, seem like a daunting task.  Just coming up with an idea for a useful tool can be difficult, as you sometimes don’t realize how often you do repetitive tasks until you really stop and assess your workflow.  Are you constantly opening files to make minor changes? Do you find yourself making the same changes on multiple sheets within your...

Why Python, and How Do I Get Started?

W

Once you’ve decided that it’s worth your time to learn about and create your own Revit tools, your first question is probably ‘Why Python’?  It turns out that there are a few very good reasons to use this programming language to create your own personal tools. Python is a relatively easy language to learn:  Compared to some other programming languages, Python is straight-forward and...

Revit + Python: Efficiency and Functionality

R

I began teaching myself Python a little over a year ago, and over that time I have been able to stretch Revit in ways I never imagined.  Prior to this effort I had no coding experience, so the tools that I have created, while robust, are not so complicated and difficult that a user with interest in coding cannot create them.  For the foreseeable future, I’ve decided to reorganize and...

Revit + Python

Andrew Urban

With almost 15 years as a registered architect, and nearly as much experience using Revit, I have recently taught myself Python and have begun to create productivity increasing addons for Revit. I'm am always interested in learning new and innovative ways to use Revit and all other tools of our profession.