使用设计自动化访问 bim 360 文件
Access bim 360 file using design automation
在 Design Automation Workitem 中指定 BIM 360 文件(dwg 或 rvt)。
创建 Design Automation 工作项时,如何在 BIM 360 中指定 dwg 或 rvt 文件作为输入?以及如何将输出文件上传回 BIM 360?我只是找不到好的样本。
What I've done so far:
Specify the Workitem file as in postman sample:
{
"activityId": "xxx.xxx+xxx",
"arguments": {
"InputFile": {
"url": "https://SomeUrl.com/to/download/the/input/max/file",
"verb": "get"
},
"OutputFile": {
"url": "https://SomeUrl.com/to/upload/the/output/FBX/file",
"verb": "put"
}
}
}
本文展示了如何通过用户登录传递资源的示例
link
{
"Arguments": {
"InputArguments": [
{
"Resource": "http://120.138.8.50:8080/drawings/1543468882182_FloorPlanSample_Master.dwg",
"Name": "HostDwg",
"Headers": [
{
"Name": "Authorization",
"Value": "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
}
]
}
],
"OutputArguments": [
{
"Name": "Result",
"HttpVerb": "POST"
}
]
},
"ActivityId": "PlotToPDF"
}
Solution: the working Workitem will be similar as the following.
{
"activityId": "{{activityId}}",
"arguments": {
"InputFile":
{
"url": "https://developer.api.autodesk.com/oss/v2/buckets/wip.dm.prod/objects/{{input guid name}}.dwg",
"headers":
{
"Authorization": "Bearer {{b360_token}}"
},
"verb": "get"
},
"OutputFile": {
"url": "https://developer.api.autodesk.com/oss/v2/buckets/wip.dm.prod/objects/{{output guid name}}.dwg",
"headers":
{
"Authorization": "Bearer {{b360_token}}"
},
"storageProvider": "A360",
"verb": "put"
}
}
}
您可以使用 BIM360 APIs to obtain the URL of a specific document in your BIM360 project. Here's a tutorial that shows how to do that: https://forge.autodesk.com/en/docs/bim360/v1/tutorials/documen-management/download-document。您是正确的,因为您需要传递访问令牌。
或者,您可能需要考虑创建一个 signed URL 来下载您的 BIM360 文档。这是由 POST buckets/:bucketKey/objects/:objectName/signed 处理的
端点。
在 Design Automation Workitem 中指定 BIM 360 文件(dwg 或 rvt)。
创建 Design Automation 工作项时,如何在 BIM 360 中指定 dwg 或 rvt 文件作为输入?以及如何将输出文件上传回 BIM 360?我只是找不到好的样本。
What I've done so far: Specify the Workitem file as in postman sample:
{
"activityId": "xxx.xxx+xxx",
"arguments": {
"InputFile": {
"url": "https://SomeUrl.com/to/download/the/input/max/file",
"verb": "get"
},
"OutputFile": {
"url": "https://SomeUrl.com/to/upload/the/output/FBX/file",
"verb": "put"
}
}
}
本文展示了如何通过用户登录传递资源的示例 link
{
"Arguments": {
"InputArguments": [
{
"Resource": "http://120.138.8.50:8080/drawings/1543468882182_FloorPlanSample_Master.dwg",
"Name": "HostDwg",
"Headers": [
{
"Name": "Authorization",
"Value": "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
}
]
}
],
"OutputArguments": [
{
"Name": "Result",
"HttpVerb": "POST"
}
]
},
"ActivityId": "PlotToPDF"
}
Solution: the working Workitem will be similar as the following.
{
"activityId": "{{activityId}}",
"arguments": {
"InputFile":
{
"url": "https://developer.api.autodesk.com/oss/v2/buckets/wip.dm.prod/objects/{{input guid name}}.dwg",
"headers":
{
"Authorization": "Bearer {{b360_token}}"
},
"verb": "get"
},
"OutputFile": {
"url": "https://developer.api.autodesk.com/oss/v2/buckets/wip.dm.prod/objects/{{output guid name}}.dwg",
"headers":
{
"Authorization": "Bearer {{b360_token}}"
},
"storageProvider": "A360",
"verb": "put"
}
}
}
您可以使用 BIM360 APIs to obtain the URL of a specific document in your BIM360 project. Here's a tutorial that shows how to do that: https://forge.autodesk.com/en/docs/bim360/v1/tutorials/documen-management/download-document。您是正确的,因为您需要传递访问令牌。
或者,您可能需要考虑创建一个 signed URL 来下载您的 BIM360 文档。这是由 POST buckets/:bucketKey/objects/:objectName/signed 处理的 端点。