Search code examples
autodesk-forgeautodeskforgeautodesk-viewer

Translate the Source File into SVF Format


I would really like to test this viewer out - and I'm trying to follow your guides on how to get the viewer up and running (using https://www.hurl.it/), but - I have encountered some problems.

I really don't understand this step: "Step 2: Upload a file to a storage location". (https://developer.autodesk.com/en/docs/data/v2/tutorials/app-managed-bucket/)

They ask me to choose a name for my object. This can be the actual filename or something like a GUID generated by a data management system, but with a file extension. The reason I don't understand this step is because the upload is not directed towards any specific file. It can be an actual file or not. They just want me to type in something and put on an extension? Like .rvt? How can the viewer then show a file that doesn't exist? It doesn't seem like it asks for to point to a file on my hard-drive? I entered "holmen1.rvt" and I ended up getting "status:failed" as I tried to verify that the translation job is complete (Step 3), calling the GET :urn/manifest. Result below:

{
"type": "manifest",
"hasThumbnail": "false",
"status": "failed",
"progress": "complete",
"region": "US",
"urn": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bXlidWNrZXRmb3J0ZXN0aW5nOTUvaG9sbWVuMS5ydnQ",
"version": "1.0",
"derivatives": [
{
"name": "holmen1.rvt",
"hasThumbnail": "false",
"status": "failed",
"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"
}
]
}

Anyone please help me understand this step!

Kind regards,

Torbjorn


Solution

  • The tool (https://www.hurl.it/) you provided seems not to have a file input. I suggest you using Postman instead. Here are my postman collection and environment for testing the Forge API (https://github.com/yiskang/forge.api.postman).

    After setting the postman environment up, you can navigate to Data Managment API >> Data Mgmt - Upload a file, and choose the Revit file you want to upload to the Forge, just like this:

    enter image description here

    Remember to set the Filename variable in the postman environment named Autodesk Forge in the above picture, and it's recommended to have the same name (with the file extension, rvt) in step 4.