0

Im trying to learn more about the Revit API as it works with BIM 360. I know I can determine isCloudInModel (which is available in the 2019 API, not the 2018 - and hopefully its available intentionally this time) and get the path using these strategies https://forums.autodesk.com/t5/revit-api-forum/determine-central-file-type-file-server-our-cloud/td-p/6506907 .

BIM 360 models don't seem to subscribe to Sync events, Im struggling to understand if I can subscribe to any events that have to do with synchronization, saving, opening or anything else.

Is there a reference for API and Limitations of models that are hosted on BIM 360?

Skinner
  • 1,461
  • 4
  • 17
  • 27

1 Answers1

0

Through the Application/ControlledApplication classes you have methods for this. You just need to have the logic for seeing if the application that is triggering the DocumentSynchronizing, DocumentSaving type Events is a BIM360 model. Which you can do with how you find the path.

With the Forge API, through the Data Management API, you can use the PostModelJob endpoint which has this functionality:

Every time you synchronize the current model with the central model, it sets the data attribute to null. When you publish the latest version to BIM 360 Docs (using the PublishModel command), it sets the status to processing or complete.

This will give you the information on if the model has been synced. You also have to be using BIM 360 Docs and not 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"
  }
}
mossherder
  • 135
  • 7