A fresh look at the venerable topic of determining the RVT file version, a short example of driving Revit from outside to add extensible storage data, and lots of AI- and tech-related snippets:
The RVT file version is the version of Revit that was used to save an RVT project document. Revit can open RVT files saved by earlier versions of Revit, and not those saved by later versions. However, opening an earlier version requires additional time on opening to convert the database from the earlier version to the current one. Therefore, it is often desirable to open an RVT document with the same version of Revit used to save it. Consequently, it is useful to know the RVT file version before launching the corresponding version of Revity to open it. The Building Coder and many Revit API discussion forum threads discuss how this can be achieved:
The official approach is to use the Revit API BasicFileInfo
;
Since it is a Revit API method, it requires a Revit session up and running with an appropriate add-in loaded, but it does not require opening the RVT file in question.
Some of the previously discussed solutions above work by extracting and analysing strings directly from the raw RVT file, or using the OLE document structure;
apparently, those solutions no longer work.
By the way, another use of BasicFileInfo
was discussed last week
to unload links with transmission data.
How to determine RVT Version came up again in the following discussion:
Question:
We use Autodesk Platform Services APS APIs to monitor model health via dashboards, but we're having trouble retrieving model version years and cloud GUIDs (e.g., 994d0d57-67d7-4288-a3e8-e9bce5d0cae5
).
Is there an easier way to access this data than using the Model Derivative API?
Answer:
The Regex approach described in the early blog posts does not work for recent Revit versions, e.g. Revit 2024 and Revit 2025.
In these versions, you can access the saved version in a formal, reliable way using the Revit API BasicFileInfo
class, which doesn’t require opening the file in question.
a Design Automation Sample of extracting BasicFileInfo
from RVT or RFA file is provided by
the DA4R-RevitBasicFileInfoExtract project on GitHub.
If I remember correctly, the regex method doesn’t return version info when testing with Revit 2024 models. (seemed due to scheme changes). A customer reported this issue in a ticket on Identifying Revit File Version. We used DA4R-RevitBasicFileInfoExtract with Design Automation API for Revit instead to address this and reliably retrieve the Revit file version year, cf. the article on how to check the version of a Revit file using Design Automation API.
The DA approach is much more reliable, based on my tests. I tried the Regex one with the Revit 2024 file and spent the whole afternoon trying to find out why it didn’t work, but failed; then I wrote the DA4R-RevitBasicFileInfoExtract sample addin for DA instead.
With Design Automation API, the customer does not have to install Revit on the local machine, just run the workitem. The Revit 2025 version can read all RVT versions equal to and lower than 2025. So, no need to make a separate app bundle for each Revit version.
Many thanks to Eason Kang for this explanation and all his research and documentation.
Chuong Ho suggested another solution for this topic in the Revit API discussion forum thread on how to know the version of a RVT file before opening the file in Revit:
A simple solution is provided by using Revit Extractor, a Python library to easily read data and export Revit data from the native Revit format. Make sure you installed the package and use the right command:
from revit_extract import RevitExtractor
rvt_path = r"D:\_WIP\Download\Sample Office Building Model V1.rvt"
version = RevitExtractor.get_version(rvt_path)
print(version)
Mohamed Arshad explains the detailed steps to launch Revit from an external EXE to modify and save an RVT or RFA document, e.g.,
to set DataStorage
Entity
from external application:
Question:
Exploring options to create DataStorage
and set entity in Revit document from external application.
After setting DataStorage entity, I need to save the document.
This needs to be done running a Revit instance in the background.
Currently, I was able to create storage and update entity in an add-in.
How can I achieve the same from a separate exe
?
The question is, how to start a new Revit instance from an exe
and access the Revit API to update the data storage entity.
Answer:
You can start Revit from an external EXE
using Process.Start.
All the other steps you describe require a valid Revit API context: to create DataStorage
, set extensible storage data in its Entity
and save the document.
One way to obtain a valid Revit API context is to use
an external event.
Many examples are provided in The Building Coder topic group
on Idling
and external events for modeless access and driving Revit from outside.
Here is a possible step-by=step approach:
static void Main(string[] args)
{
string exeLocation = @"C:\Program Files\Autodesk\Revit 2023\Revit.exe";
string arguments = @"/languageENG /runhidden /nosplash";
ProcessStartInfo revitInfo= new ProcessStartInfo(exeLocation,arguments);
Process.Start(revitInfo);
}
OnStartup
method your application implements, subscribe to ApplicationInitialized
eventApplicationInitialized
event handlerMany thanks to Mohamed for spelling out the detailed steps.
Moving away from the Revit API to other AI-related and technical issues, Tesla presented plans for autonomous vehicles and humanoid robots in an 8-minutes video of their We, Robot Event:
CEO Elon Musk unveils Robotaxi, a fully autonomous car for less than $30,000, Robovan, a 20 passenger vehicle, and new updates to its humanoid robot, Optimus, for less than the cost of a car.
Further AI-related news is presented in the State of AI Report 2024.
The Nobel prize for science is also related to AI and deep learning, awarded to John J. Hopfield and Geoffrey E. Hinton, training early artificial neural networks. They used physics to find patterns in information; Further Scientific Background to the Nobel Prize in Physics 2024, For Foundational Discoveries And Inventions That Enable Machine Learning With Artificial Neural Networks.
One view of the risks associated with AI proposes that AI will not destroy the world – AI illiteracy and misuse could.
Another interesting philosophical discussion looks critically at scientific progress in general: analysing The Techno-Pro Attitude, Robin K. Hill suggests we look at the underlying presumption of the technology imperative.
Let's end mentioning another common fallacy, the Jevons paradox; it occurs when technological progress increases the efficiency with which a resource is used (reducing the amount necessary for any one use), but the falling cost of use induces increases in demand enough that resource use is increased, rather than reduced. Governments, both historical and modern, typically expect that energy efficiency gains will lower energy consumption, rather than expecting the Jevons paradox. On November 24, Switzerland will vote on whether to spend heavily to increase motorway bottleneck capacity, hoping to reduce traffic jams, possibly heading straight into another unfortunate example of the Jevons paradox.