使用设计自动化访问bim 360文件 [英] Access bim 360 file using design automation

查看:39
本文介绍了使用设计自动化访问bim 360文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Specifying BIM 360 file (dwg or rvt) in Design Automation Workitem.

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

When create a Design Automation Workitem, how can I specify a dwg or rvt file in BIM 360 as the input? and how can I upload the output file back to BIM 360? I just can't find a good sample of this.

到目前为止,我所做的是:如邮递员示例中那样指定Workitem文件:

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

本文显示了如何通过用户登录传递资源的示例链接

This article shows a sample of how to pass resources with a user login 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"
        }
    }
}

推荐答案

您可以使用https://forge.autodesk.com/zh-CN/docs/bim360/v1/tutorials/documen-management/download-document .您是正确的,因为您需要传递访问令牌.

You can use 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. You're correct in that you'd need to pass along an access token.

或者,您可能要考虑创建一个 signed URL,以从中下载BIM360文档.这由

Alternatively, you might want to consider creating a signed URL to download your BIM360 document from. That's handled by the POST buckets/:bucketKey/objects/:objectName/signed endpoint.

这篇关于使用设计自动化访问bim 360文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆