【问题标题】:Access bim 360 file using design automation使用设计自动化访问 bim 360 文件
【发布时间】:2019-06-22 02:42:15
【问题描述】:

在 Design Automation Workitem 中指定 BIM 360 文件(dwg 或 rvt)。

创建设计自动化工作项时,如何在 BIM 360 中指定 dwg 或 rvt 文件作为输入?以及如何将输出文件上传回 BIM 360?我只是找不到一个好的样本。

到目前为止我做了什么: 在 postman 示例中指定 Workitem 文件:

{
    "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"
}

解决方案:工作的 Workitem 将类似于以下内容。

{
    "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"
        }
    }
}

【问题讨论】:

  • 到目前为止你尝试了什么?
  • 请看更新。

标签: autodesk-forge


【解决方案1】:

您可以使用BIM360 APIs 获取 BIM360 项目中特定文档的 URL。这是一个展示如何做到这一点的教程:https://forge.autodesk.com/en/docs/bim360/v1/tutorials/documen-management/download-document。您是正确的,因为您需要传递访问令牌。

或者,您可能需要考虑创建一个签名 URL 来下载您的 BIM360 文档。这由POST buckets/:bucketKey/objects/:objectName/signed 端点处理。

【讨论】:

    猜你喜欢
    • 2018-07-02
    • 2020-06-24
    • 1970-01-01
    • 1970-01-01
    • 2019-05-09
    • 2021-10-27
    • 2021-03-28
    • 2019-04-11
    • 2019-05-27
    相关资源
    最近更新 更多