- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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.
Solved! Go to Solution.