Hacking Revit
Extracting sequences from found Revit files
Revit Extant ID “age” representation. 3D Villa Moissi model provided by Prof. Takehiko Nagakura.
The sequence in which a program displays model elements typically depends on the sequence in which elements appear in the internal program index. Different programs index elements in different ways but most indices are mutable. Users can change the sequence in which elements appear in the internal database by editing parts, throwing those newly edited parts to the end of the database.
Revit is an exception; unless a model is being worked on in collaboration mode, where two or more versions of the same file exist in parallel and eventually have to be merged into a single sequence, the Revit index is immutable. Therefore a deleted element produces a gap in the Revit Object ID index and an edited
object keeps its original place in the index.
As a result, it is possible to look at the relative “ages” of different Revit
elements in a file and recreate a micro-history of sorts based on this information. This comes with various caveats: we can only see what a Revit element looks like in it’s most recent instantiation, and we can’t see how it has been edited over time.
Using a simple Dynamo script, the sequence of user-instantiated Revit elements (like walls, windows and stairs) can be extracted from a given Revit file and assigned a color based on it’s “age” relative to the other extant elements in the file. The diagram at the top of the page shows a Villa Moissi 3D model with the earliest extant elements in yellow and the most recent ones in blue. This representation of a Revit file’s partial “history” could allow us to gather information about how people use software programs, aggregating data to build an understanding of how our software influences the kinds of design decisions we make as designers. By comparing different users’ attempts to model the same building, we can glean information about the different design priorities of users when faced with similar tasks.
“Elements” in Revit include building components but also drawings, views, hover-activated notations, and other internal runtime software events. Revit assigns each element in a file a Revid ID number. Using the Revit API, it is possible to produce a chronological list of the objects which exist in a given file. What we observe by examining the Revit ID list is that the beginning of the database records Revit itself instantiating software environment objects. The first part of the list (shown on the subsequent pages) could be said to represent the setting up of the Revit modeling space for the user. Examining the first 2,000 elements closely reveals Revit’s world-view through its world-building.
After the modeling environment is created by Revit, user instantiated objects begin to appear in the database. With the Revit API it is possible to see the types of objects that were instantiated by the user over time in a given file. The diagram above shows how a user sequence can be broken down by type of object to provide a picture of modeling activity over time. In the above sequence, the user may have started by modeling walls, then walls and floors, followed by windows, stairs, doors and lights. Comparing two different user’s models of the same building could illustrate two different ways of conceiving of architecture.
Revit-instantiated Objects in the Revit ID list