meteor314
meteor314

Reputation: 43

Can not translate some files with Autodesk Model Derivative API

I've this error : The file is not a Revit file or is not a supported version.

     {
  "statusCode": 200,
  "headers": {
    "content-type": "application/json; charset=utf-8",
    "date": "Sun, 18 Sep 2022 16:30:45 GMT",
    "strict-transport-security": "max-age=31536000; includeSubDomains",
    "x-ads-app-identifier": "platform-viewing-2022.08.01.130.037ecd45a-production",
    "x-ads-duration": "303 ms",
    "x-ads-startup-time": "Fri Sep 16 11:02:18 UTC 2022",
    "content-length": "704",
    "connection": "Close"
  },
  "body": {
    "urn": "**9qZWN0LnJ2dA",
    "derivatives": [
      {
        "extractorVersion": "2024.0.2022.0818",
        "hasThumbnail": "false",
        "name": "rac_basic_sample_project.rvt",
        "progress": "complete",
        "messages": [
          {
            "type": "error",
            "code": "Revit-UnsupportedFileType",
            "message": "<message>The file is not a Revit file or is not a supported version.</message>"
          },
          {
            "type": "error",
            "message": "Possibly recoverable warning exit code from extractor: -536870935",
            "code": "TranslationWorker-RecoverableInternalFailure"
          }
        ],
        "outputType": "svf",
        "status": "failed"
      }
    ],
    "hasThumbnail": "false",
    "progress": "complete",
    "type": "manifest",
    "region": "US",
    "version": "1.0",
    "status": "failed"
  }
}
        

Body of translation job :

function translateData(ossUrn) {
    var postJob = {
        input: {
            urn: ossUrn
        },
        output: {
            force : "true",
            "destination": {
                "region": "us"
            },
            formats: [{
                type: "svf",
                views: ["2d", "3d"]
            }]
        }
    };
    return postJob;
}

I do not know where this problem comes from I tried with several files, and even pdf. It seems random since some files are translated correctly and others don't.

Upvotes: 0

Views: 100

Answers (1)

Eason Kang
Eason Kang

Reputation: 7070

Thanks for the file. It was saved by Revit 2019.

But sorry, I cannot reproduce this issue with it. So, I suspect that your uploaded model might be corrupted. That's why MD cannot tell which Revit version it is.

Could you try this sample to see if it works for you?

https://github.com/Autodesk-Forge/forge-simple-viewer-nodejs

Here is the test manifest:

{
    "urn": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6c2FuZGJveC9yYWNfYmFzaWNfc2FtcGxlX3Byb2plY3RfU08ucnZ0",
    "derivatives": [
        {
            "extractorVersion": "2024.0.2022.0818",
            "hasThumbnail": "true",
            "children": [
                // ...
            ],
            "name": "rac_basic_sample_project_SO.rvt",
            "progress": "complete",
            "outputType": "svf",
            "properties": {
                "Document Information": {
                    "RVTVersion": "2019",
                    "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": ""
                }
            },
            "status": "success"
        },
        // ...
    ],
    "hasThumbnail": "true",
    "progress": "complete",
    "type": "manifest",
    "region": "US",
    "version": "1.0",
    "status": "success"
}

Upvotes: 0

Related Questions