Guide
How to Check Which Revit Version Saved an RVT File
A colleague sends an RVT file and your Revit refuses to open it, or opens it and offers to upgrade it. Before you reply, it helps to know exactly which Revit release saved the file. You can find that out without opening the model.
Option 1: open it in Revit
If the file is from an older release, Revit tells you when it opens it and upgrades the model to your version. If the file is newer than your Revit, Revit cannot open it at all. Either way you learn only “older” or “newer”, not the exact year, and upgrading a large model can take a long time. Do not save the upgraded copy over the original if the sender still works in the older version: there is no way back.
Option 2: read the version from the file
An RVT or RFA file is a container of named streams (an OLE compound file, the same structure as old .doc and .xls files). One small stream, BasicFileInfo, stores the release of the Revit that last saved the file. It sits at the start of the stream as UTF-16 text in one of two forms:
| Saved with | Text at the start of BasicFileInfo |
|---|---|
| Revit 2018 and older | Autodesk Revit 2016 (Build: 20150714_1515(x64)) |
| Revit 2019 and newer | 2023 followed by the build, for example 20220215_1515(x64) |
Both lines above are copied from real public sample files. Product names vary in older files, for example Autodesk Revit Architecture 2015 (Build: ...).
The script below reads only this stream, so it is fast even on large models. It needs Python 3 and the olefile package (BSD licence).
import re, sys
import olefile # pip install olefile
def revit_version(path):
with olefile.OleFileIO(path) as ole:
info = ole.openstream("BasicFileInfo").read().decode("utf-16-le", "ignore")
old = re.search(r"Autodesk Revit[A-Za-z ]* (\d{4}) \(Build", info)
if old: # Revit 2018 and older
return old.group(1)
new = re.search(r"[\x20-\x7e]+", info) # newer files start with the release year
return new.group(0) if new and re.fullmatch(r"20\d\d", new.group(0)) else None
for f in sys.argv[1:]:
print(revit_version(f), f)
Run it on one file or a whole folder:
python rvt_version.py "C:\Projects\Building.rvt"
python rvt_version.py C:\Projects\*.rvt
We tested the script on 69 public RVT files saved with Revit 2014 to Revit 2027 and on RFA family files: it printed a release year for every RVT and for five of six RFA files. On a 96 MB model it finished in a quarter of a second. A file that is not an RVT or RFA, or a damaged one such as the sixth RFA, fails with an error from olefile instead of printing a year.
What to do with the answer
- The file is older than your Revit: open it and let Revit upgrade it, but keep the original if the sender still works in the older release.
- The file is newer than your Revit: you cannot open it, and nobody can save it back to your version. Ask the sender for an IFC export, or convert it yourself with the RVT to IFC converter, which reads Revit 2019 to 2027 without Revit. Then link or open the IFC in your Revit. The options are compared on Revit versions.
- You only need the data: quantities, parameters and element lists come straight out of the RVT with Revit to Excel, whatever release saved it, as long as it is 2019 to 2027.
FAQ
Can I see the Revit version without Revit installed?
Yes. Every RVT and RFA file carries a small BasicFileInfo stream with the release year of the Revit that saved it. The Python script in this guide reads it with the open source olefile package.
Can I convert the file to my older Revit version?
No. Revit cannot save to an earlier version, and our converters do not downgrade RVT files either. To hand a model to an older Revit, export it to IFC. See Revit versions for the options.
Which versions do the DDC converters read?
RVT and RFA files saved with Revit 2019 to 2027, without Revit on the machine.