Is it possible to open a BIM 360 model without using Forge?

Is it possible to open a BIM 360 model without using Forge?

dantartaglia8696
Advocate Advocate
6,639 Views
21 Replies
Message 1 of 22

Is it possible to open a BIM 360 model without using Forge?

dantartaglia8696
Advocate
Advocate

Hi,

Using 2019.1, is it possible to open a BIM 360 C4R models using only the Revit API? Below is from the 2019.1 SDK help file. It may not be possible but I'm trying to handing BIM 360 and non-BIM 360 opening of models using: OpenDocumentFile(), I'm not ready yet to use Forge. Can this be done? My attempts so far have failed.

 

Thanks,

Dan

 

Existing APIs now support open from cloud paths (Collaboration for Revit)

Document Open APIs support cloud paths

The existing methods:

  • Application.OpenDocumentFile(ModelPath modelPath, OpenOptions openOptions)
  • UIApplication.OpenAndActivateDocument(ModelPath modelPath, OpenOptions openOptions, bool detachAndPrompt)

and the new methods:

  • Application.OpenDocumentFile(ModelPath modelPath,OpenOptions openOptions, IOpenFromCloudCallback openFromCloudCallback)
  • UIApplication.OpenAndActivateDocument(ModelPath modelPath, OpenOptions openOptions, bool detachAndPrompt, IOpenFromCloudCallback openFromCloudCallback)

now offer the ability to open a C4R model from its location on the cloud. Obtain a relevant ModelPath representing the document from:

  • ModelPathUtils.ConvertCloudGUIDsToCloudPath(Guid, Guid)

by inputting the the project Guid and model Guid (which could be obtained from various Forge APIs).

Callback for conflict cases when opening from a cloud path

The callback method:

  • Autodesk.Revit.DB.IOpenFromCloudCallback.OnOpenConflict()

can be passed to the document open methods to gain to handle conflict cases. The method is passed an OpenConflictScenario value identifying the reason for the conflict ( Rollback, Relinquished or OutOfDate) and should return an OpenConflictResult with the desired response (keep local changes, discard local changes and open the latest version or cancel).

The new class:

  • DefaultOpenFromCloudCallback

provides a default way to handle conflicts: it always discards the local change and gets the latest version from the cloud.

0 Likes
Accepted solutions (1)
6,640 Views
21 Replies
Replies (21)
Message 21 of 22

dantartaglia8696
Advocate
Advocate

In the end you need the Project GUID and Model GUID for this to work. There adifferent ways to capture this info, a couple are: 1. When a model opens, save the info to an external source (DB, Excel, text file, ect). 2. You can use the Data Connector as long as you have top admin creds to your BIM 360 hub. See this: https://knowledge.autodesk.com/support/bim-360/learn-explore/caas/CloudHelp/cloudhelp/ENU/BIM360D-In...

0 Likes
Message 22 of 22

SONA-ARCHITECTURE
Advocate
Advocate

Hi @dantartaglia8696 

Thx for answering me.

You're right! With the DataConnector, I can choose via a OpenFileDialog my clouded files (only synchronized files). And it works fine.

I don't have to use the ForgeAPI

Many thx!

 

Pierre NAVARRA
SONA-Architecture.
http://www.sona-architecture.com
https://fr.linkedin.com/in/pierre-navarra-62032a107