Reputation: 45
Prior discussion of this topic
I have found an similar question here that is quite old. Hoping for an update.
I have found a possible development in the right direction, but as far as I can tell, this doesn't work in my case because I am not using the Forge Model Viewer and do not have a URN
that works with the referenced API endpoint.
Question Details
I have a use case where we want to get the details for a particular Revit model via the Forge API. We're getting the inputs needed to use the Revit 2021+ APIs ConvertCloudGUIDsToCloudPath Method (String, Guid, Guid) Method : region
, projectId
, and modelId
.
The last piece of the puzzle is proving difficult to find. My automation process passes this information to an app that launches the correct Revit version and then our Revit addin uses the Revit API referenced above to open the cloud model. This process runs on a Windows virtual machine and is not monitored by a user. Right now we have to ask the submitting user for the Revit version (to be launched) because we cannot find it in the Forge API. This seems like a simple thing that should be available at the BIM 360 / ACC project level since each project can have only one Revit version. OR, it should be available from the Data Management API item data. I have not found it in either location.
Insights would be appreciated!
Upvotes: 0
Views: 1012
Reputation: 7070
Here is the pure Forge approach. Just updated my reply to Get Revit Version of BIM 360 File using Forge
We can now get the Revit version from the response of Model Derivative Manifest API. If you don't see that, please reupload your model to BIM360 to trigger translation.
"name": "rac_basic_sample_project.rvt",
"progress": "complete",
"outputType": "svf2",
"properties": {
"Document Information": {
"RVTVersion": "2022",
"Project Name": "Sample House",
"Project Number": "001-00",
"Author": "Samuel Macalister",
"Project Address": "Enter address here",
"Project Issue Date": "Issue Date",
"Project Status": "Project Status",
"Building Name": "Samuel Macalister sample house design",
"Client Name": "Autodesk",
"Organization Name": "Autodesk",
"Organization Description": ""
}
},
See https://stackoverflow.com/a/70664111/7745569 to know how to get the derivative urn from the model version tip.
Upvotes: 0
Reputation: 8339
I found one internal answer saying:
To find Revit version of a file, one can do so without having to send the file to DA or even needing to use Revit API, cf. Determining the RVT File Version Without Revit. An attempt was made by forge experts in the past that only a small chunk of Revit file can be downloaded to read and determine Revit version. That attempt failed.
When you know the version of the Revit file and want to upgrade it to a certain higher version, you can use the DA4R upgrader sample. The sample code is for 2019, but one can easily extend it for other versions. Each conversion to each version will require a separate DA job.
I seem to remember a newer information about the Revit file version being included in some metadata somewhere with no need to download the RVT... I'll continue hunting for that.
Upvotes: 0
Reputation: 8339
The Building Coder discussed this issue in November 2020: Determining RVT File Version for DA4R Workitem. That is a little more recent and hopefully provides all the information you need to resolve your task.
Upvotes: 0