Search code examples
autodesk-forgeautodesk-data-management

How to Upload a worksharing Revit model in BIM360 Docs using Autodesk Forge Data Management API


I have been following those two links to Upload an RVT File:

And POST items works fine as long as the type of file is "item:autodesk.bim360:File".

The problem is that if you browse through Autodesk Docs in Revit, the .RVT file will not be visible.

Worksharing model have the type "items:autodesk.bim360:C4RModel" instead.

But if I try to post the same item with the type: "items:autodesk.bim360:C4RModel" I get the strange following error:

CATCH ERR failed to create an item: {
   id: '5c2fb263-c2fd-45d1-b213-0c38d26de9c1',   
   status: '403',   
   code: 'USER_NOT_AUTHENTICATED',   
   detail: "The client_id is not whitelisted for schema 'items:autodesk.bim360:C4RModel' access." }

Note: I tried with both 3-legged and 2 legged with x-user-id.

If I post the item with the type "items:autodesk.bim360:File" and then try to Publish Model using CommandsApi, then I get the following error:

{ statusCode: 500, statusMessage: 'InternalServerError' }
CATCH ERR failed to publish an item. {
  id: '610f1aa8-68d5-4adc-be26-7fd7228a02e9',
  status: '500',
  code: 'C4R',
  detail: 'Failed to publish model'
}

So how can I upload a model and then convert it to a Worksharing model? Can it be done? Any Help would be much appreciated.


Solution

  • Unfortunately, you will need to initialize the Cloud Worksharing model using Revit API with Revit Desktop at this moment. You cannot use the items:autodesk.bim360:C4RModel type to do so as I know.

    See here for the details of initialize the Cloud Worksharing models using Revit API

    https://forums.autodesk.com/t5/revit-api-forum/initiate-cloud-collaboration-for-a-workshared-model/m-p/10114585/highlight/true#M53859