我和一個朋友在這裏遵循的Autodesk查看器教程: https://developer.autodesk.com/en/docs/viewer/v2/tutorials/basic-viewer/SVF POST作業文件轉換失敗
我們除了最後使用API POST job
端點都完成了所有前面的步驟發送base64將urn
編碼爲Model Derivative API以轉換爲SVF文件,以便Autodesk Viewer可以使用它。
這是我用什麼來發送POST job
要求:
curl -X 'POST' -H 'Authorization: Bearer cywr9WWu8kml3rQIVnPDohFDsoRl' -H
'Content-Type: application/json' -v 'https://developer.api.autodesk.com/modelderivative/v2/designdata/job'
-d '{"input": {"urn": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bXl0ZXN0YnVja2V0dGVzdDIvZ2lyaV9zaXJfY29weTEucnZ0"},
"output": {"formats": [{"type": "svf","views": ["2d","3d"]}]}}'
,這是API的響應:
{"type":"manifest","hasThumbnail":"false","status":"failed","progress":"complete",
"region":"US","urn":"dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bXl0ZXN0YnVja2V0dGVzdDIvZ2lyaV9zaXJfY29weTEucnZ0",
"derivatives":[{"name":"giri_sir_copy1.rvt","hasThumbnail":"false","status":"failed",
"progress":"complete","messages":[{"type":"error","code":"Revit-InternalError",
"message":"<message>We have encountered some issues while preparing the file for viewing.
Please contact support for assistance.</message>"},{"type":"error",
"message":"Unrecoverable exit code from extractor: -1073741831",
"code":"TranslationWorker-InternalFailure"}],"outputType":"svf"}]}
任何見解是極大的讚賞。
這個.rvt文件可以在Revit上打開嗎?似乎它在某處被損壞,可能是在上傳過程中?你可以在http://modelderivative.herokuapp.com/和瀏覽器上嘗試「上傳」嗎?只是爲了確保文件真的有效。 –
嘿@AugustoGoncalves,謝謝你的回覆。是的,我能夠成功上傳和查看來自Autodesk360.com的'rvt文件。 – Mikeumus
@AugustoGoncalves,在heroku應用程序中記錄到「製作」請求權限,但回調給出了這個:https://git.io/voMaF – Mikeumus