0

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!

3 Answers3

0

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.

Jeremy Tammik
  • 7,333
  • 2
  • 12
  • 17
  • I think this is where my confusion comes in. Do I really have to use DA4R or the Forge Viewer to get this Revit version information from the Model Derivative API? And if so, I don't see a practical avenue to use them for simple model selection. [Part 1 of 2] – Kristen Schulte Aug 31 '22 at 21:07
  • I have attempted to get this information using the id returned from the Data Management API (formatted like "urn:adsk.wipprod:dm.lineage:0w-PNd1LQjaIYBNe64_bkQ") for the Revit model item, but that returns 404 Not Found. I have tried both the full id and the id cut after the ":" colon character. Neither succeeded. How do I get the model's URN to make this request referenced in Augusto Goncalves's post/tweet? [Part 2 of 2] – Kristen Schulte Aug 31 '22 at 21:07
  • Apparently, you need to download the entire RVT somehow or other. Whether you need to do that via the viewer, DA4R, or other means, and which approach is optimal for your use case, is beyond my ken. – Jeremy Tammik Sep 01 '22 at 13:18
0

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.

Jeremy Tammik
  • 7,333
  • 2
  • 12
  • 17
0

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.

Eason Kang
  • 6,155
  • 1
  • 7
  • 24