【问题标题】:BIM 360 and the Revit APIBIM 360 和 Revit API
【发布时间】:2019-08-27 09:59:36
【问题描述】:

我正在尝试了解有关 Revit API 的更多信息,因为它与 BIM 360 一起使用。我知道我可以确定 isCloudInModel(它在 2019 API 中可用,而不是 2018 年 - 希望这次有意使用它)并获得使用这些策略的路径https://forums.autodesk.com/t5/revit-api-forum/determine-central-file-type-file-server-our-cloud/td-p/6506907

BIM 360 模型似乎不订阅同步事件,我很难理解我是否可以订阅与同步、保存、打开或其他任何事情有关的任何事件。

是否有 API 参考和 BIM 360 上托管的模型的限制?

【问题讨论】:

    标签: api autodesk-forge revit bim


    【解决方案1】:

    通过 Application/ControlledApplication 类,您可以使用此方法。您只需要了解触发 DocumentSynchronizing、DocumentSaving 类型事件的应用程序是否为 BIM360 模型的逻辑即可。您可以通过如何找到路径来执行此操作。

    使用 Forge API,通过数据管理 API,您可以使用具有此功能的 PostModelJob 端点:

    每次将当前模型与中心模型同步时,都会将数据属性设置为 null。当您将最新版本发布到 BIM 360 Docs(使用 PublishModel 命令)时,它会将状态设置为处理中或完成。

    这将为您提供有关模型是否已同步的信息。您还必须使用 BIM 360 Docs 而不是 BIM 360 Team。

    Successful Retrieval of C4R Publish Status - Model Needs Publishing (200)
    
    Note that if you have updated the central model, the data attribute is set to null until you publish it.
    
    Request
      curl -X POST -v "https://developer.api.autodesk.com/data/v1/projects/b.project.id.xyz/commands/" -H "Authorization: Bearer kEnG562yz5bhE9igXf2YTcZ2bu0z" -H "Content-Type: application/vnd.api+json" -d '
      {
        "jsonapi": {
          "version": "1.0"
        },
        "data": {
          "type": "commands",
          "attributes": {
            "extension": {
              "type": "commands:autodesk.bim360:C4RModelGetPublishJob",
              "version": "1.0.0"
          }
        },
        "relationships": {
          "resources": {
            "data": [ { "type": "items", "id": "urn:adsk.wip:dm.file:hC6k4hndRWaeIVhIjvHu8w" } ]
          }
        }
      }
    }'
    
    Show Less
    Response
    {
      "data": null
      "jsonapi": {
        "version": "1.0"
      }
    }
    

    【讨论】:

      猜你喜欢
      • 2021-05-15
      • 2020-09-30
      • 2020-11-05
      • 2019-11-19
      • 1970-01-01
      • 2020-11-17
      • 2019-03-06
      • 2020-04-21
      • 2016-12-21
      相关资源
      最近更新 更多