简体   繁体   English

访问位于BIM360 Design(旧C4R)的WIP文件夹中的文件

[英]Access files located in the WIP folder of BIM360 Design (old C4R)

We have a requirement from one of our clients to access the project files that are stored in the BIM360 Design (old Collaboration for Revit - C4R). 我们的一位客户要求我们访问存储在BIM360 Design (Revit的旧协作-C4R)中的项目文件 I can not find any information in the developer pages of the Forge APIs that points to this location. 我在Forge API的开发人员页面中找不到指向该位置的任何信息。 I assume such an API is not part of Forge, but we were wondering if there is any other API that can provide those files. 我认为这样的API不是Forge的一部分,但我们想知道是否还有其他API可以提供这些文件。 The exact requirements are: 确切的要求是:

  • Constantly monitor for changes on the files located there. 不断监视那里文件的更改。
  • When changes occur, retrieve and backup all those files to a local machine. 发生更改时,检索所有这些文件并将其备份到本地计算机。

The question is, how, if possible, can we access the project files located at the BIM360 Design cloud ? 问题是, 如果可能,我们如何才能访问位于BIM360 Design云中的项目文件


UPDATE (10/04/2018) 更新 (10/04/2018)

We have found these commands - specifically PublishModel and GetPublishModelJob . 我们已经找到了这些命令 -特别是PublishModelGetPublishModelJob This does something, we can at the very least prompt the publication on demand, without the need for Revit. 这样可以做一些事情,我们至少可以按需提示发布出版物,而无需Revit。 It is not clear to me when the items:autodesk.bim360:C4RModel pseudo-file is created. 我不清楚何时创建items:autodesk.bim360:C4RModel伪文件。 On top of that, the API does not appear to be able to receive a prefered output folder, which makes it really cumbersome to work for the intended purpose of backing up the information inside BIM360 Design. 最重要的是,该API似乎无法接收到首选的输出文件夹,这使得备份BIM360 Design中的信息的预期目的变得非常麻烦。

UPDATE (25/04/2018) 更新 (25/04/2018)

We have tried using both commands ( PublishJob and GetPublishModelJob ). 我们已经尝试使用两个命令( PublishJobGetPublishModelJob )。 We have impersonated a Project Admin (via the x-user-id ) but Forge is returning a 401 error (which is not even documented). 我们已经模拟了项目管理员(通过x-user-id ),但是Forge返回401错误(甚至没有记录)。 The following (with a redacted documentID) is what we have tried: 我们尝试了以下内容(带有已编辑的documentID):

{
    "jsonapi": {
      "version": "1.0"
    },
    "data": {
      "type": "commands",
      "attributes": {
        "extension": {
          "type": "commands:autodesk.bim360:C4RModelGetPublishJob",
          "version": "1.0.0"
      }
    },
    "relationships": {
      "resources": {
        "data": [ { "type": "items", "id": "<document_id>" } ]
      }
    }
  }
}

And this is Forge's response: 这是Forge的回应:

{
    "jsonapi": {
        "version": "1.0"
    },
    "errors": [
        {
            "id": "a4547153-1fd4-4710-b0d1-a7184d9e7e22",
            "status": "401",
            "code": "C4R",
            "detail": "Failed to get publish model job"
        }
    ]
}

Any thoughts? 有什么想法吗?

Do you have an access right to the workshared Revit file? 您具有对工作共享的Revit文件的访问权吗? Publish command is to publish workshared central model in the cloud to Docs. 发布命令是将云中的工作共享中心模型发布到Docs。 To use it, you need an access to Revit model in the central in the cloud. 要使用它,您需要访问云中央的Revit模型。 Forge Publish command does the same thing as publish command in Revit desktop. Forge发布命令与Revit桌面中的发布命令具有相同的作用。 You need the same access right. 您需要相同的访问权限。 To use cloud workshared feature, first you need to have Design license assigned to you, then you also need to be a member a Revit project. 要使用云工作共享功能,首先需要为您分配设计许可证,然后还需要成为Revit项目的成员。 Being invited to Docs is not enough. 仅受邀参加Docs是不够的。

(As C4R/Design was merged to Docs recently, this C4R specific license part was intentionally kept the same as previous licensing. We also have Team for earlier versions. It makes it a bit complicated. I hope it will be easier as we move forward in future.) (由于C4R / Design是最近合并到Docs的,因此该C4R特定的许可部分有意保持与以前的许可相同。我们还拥有适用于较早版本的Team。这使它有些复杂。我希望随着我们的前进,它将变得更加容易。在未来。)

After discussing with @tfrascaroli in Forge Help channel, we found the root cause of this error is caused by the incorrect value of x-user-id , so he didn't have the right permission to push the latest version of the C4R model to BIM360 docs. 在Forge帮助频道中与@tfrascaroli讨论之后,我们发现此错误的根本原因是x-user-id值不正确,因此他没有权限将最新版本的C4R模型推送到BIM360文档。

{
    "jsonapi": {
        "version": "1.0"
    },
    "errors": [
        {
            "id": "a4547153-1fd4-4710-b0d1-a7184d9e7e22",
            "status": "401",
            "code": "C4R",
            "detail": "Failed to get publish model job"
        }
    ]
}

The x-user-id is not a GUID and not the id we saw in the response of GET users or GET users/:user_id , it should be the value of the uid . x-user-id不是GUID,也不是我们在GET用户GET users /:user_id响应中看到的id ,它应该是uid的值。 After replacing the x-user-id value by the uid , the error doesn't show up again. uid替换x-user-id值后,错误不再出现。

[
  {
    "id": "a75e8769-621e-40b6-a524-0cffdd2f784e",  //!<<< We didn't use it for `x-user-id`
    "account_id": "9dbb160e-b904-458b-bc5c-ed184687592d",
    "status": "active",
    "role": "account_admin",
    "company_id": "28e4e819-8ab2-432c-b3fb-3a94b53a91cd",
    "company_name": "Autodesk",
    "last_sign_in": "2016-04-05T07:27:20.858Z",
    "email": "john.smith@mail.com",
    "name": "John Smith",
    "nickname": "Johnny",
    "first_name": "John",
    "last_name": "Smith",
    "uid": "L9EBJKCGCXBB",   //!<<<<< Here is the value for the x-user-id
    "image_url": "http://static-dc.autodesk.net/etc/designs/v201412151200/autodesk/adsk-design/images/autodesk_header_logo_140x23.png",
    "address_line_1": "The Fifth Avenue",
    "address_line_2": "#301",
    "city": "New York",
    "postal_code": "10011",
    "state_or_province": "New York",
    "country": "United States",
    "phone": "(634)329-2353",
    "company": "Autodesk",
    "job_title": "Software Developer",
    "industry": "IT",
    "about_me": "Nothing here",
    "created_at": "2015-06-26T14:47:39.458Z",
    "updated_at": "2016-04-07T07:15:29.261Z"
  }
]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM