我能够完成上传 Revit 文件并在查看器中翻译和加载的所有步骤。我现在正在尝试下载翻译后的 SVG/SVF 以供离线查看。我找到了对以下端点的引用并对此进行了测试:
function download(){
var uri = 'https://developer.api.autodesk.com/derivativeservice/v2/derivatives/<<urn>>' ;
var authorizationHeader = 'Bearer <<token>>'
request.get(
{
url: uri,
headers:
{
'Authorization': authorizationHeader,
'Accept-Encoding': 'gzip, deflate'
},
},
function(error, response, body){
if(!error){
console.log(body);
}else{
console.log(error);
}
});
}
API 返回:
{"diagnostic":"Derivative api 仅支持 adsk.viewing & adsk.objects urn"}