[英]Can not translate some files with Autodesk Model Derivative API
我有这个错误:该文件不是 Revit 文件或不是受支持的版本。
{
"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"
}
}
翻译工作主体:
function translateData(ossUrn) {
var postJob = {
input: {
urn: ossUrn
},
output: {
force : "true",
"destination": {
"region": "us"
},
formats: [{
type: "svf",
views: ["2d", "3d"]
}]
}
};
return postJob;
}
我不知道这个问题来自哪里我尝试了几个文件,甚至 pdf。 这似乎是随机的,因为有些文件被正确翻译,而另一些则没有。
谢谢你的文件。 它由 Revit 2019 保存。
但抱歉,我无法用它重现这个问题。 因此,我怀疑您上传的 model 可能已损坏。 这就是为什么 MD 无法分辨它是哪个 Revit 版本的原因。
你能试试这个样本看看它是否适合你吗?
https://github.com/Autodesk-Forge/forge-simple-viewer-nodejs
这是测试清单:
{
"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"
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.