Get Revit Project Synch State

Get Revit Project Synch State

Dale.Bartlett
Collaborator Collaborator
536 Views
1 Reply
Message 1 of 2

Get Revit Project Synch State

Dale.Bartlett
Collaborator
Collaborator

Hi, I wish to access a Revit project and determine whether it has been Synched with Central and all objects relinquished. I'd prefer to do this from outside of Revit. or at least outside the queried project. I haven't been able to find any information at all in this regard. Thanks (hopefully)




______________
Yes, I'm Satoshi.
0 Likes
537 Views
1 Reply
Reply (1)
Message 2 of 2

jeremytammik
Autodesk
Autodesk

Dear Dbartlett,

There is no direct access to this information, neither inside and certainly not outside of Revit.

Here is a risky, unsupported and untested idea for a possible workaround:

You could try opening the project, subscribing to the DocumentSynchronizingWithCentral event, attempting to save to central, and then cancelling the event if it is raised. It may be that the event is not raised if the project has already been fully synched.

The documentation says that this event is cancellable:

This event is raised when Revit is just about to synchronize a document with central model.

Handlers of this event are permitted to make modifications to any document (including the active document), except for documents that are currently in read-only mode.

Event is cancellable. To cancel it, call the 'Cancel()' method in event’s argument to True. Your application is responsible for providing feedback to the user about the reason for the cancellation.

However, our experts do not recommend cancelling it without a good reason, so it is up to you whether you really want to try this out.

Good luck and best regards,

Jeremy
--
Jeremy Tammik
Autodesk Developer Network -- http://www.autodesk.com/joinadn
The Building Coder -- http://thebuildingcoder.typepad.com



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes