Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get status of central file

3 REPLIES 3
Reply
Message 1 of 4
JesikaD
474 Views, 3 Replies

Get status of central file

I am doing some work around worksharing and I am being proactive about detecting that state of the workset and the local file. There is one situation that I have not been able to nail down. I am using the ModelUpdatesStatus, but is does not include a status for 'Central File Missing'. It reports 'Current with Central' when disconnected from the Central File, which is misleading.

 

We are catching the Exceptions caused by checking out worksets when there are issues with the central file (e.g. CentralModelException, CentralFileCommunicationException), but we want to know before we try. 

 

Is there a way to get the status of the central model or the connection to the central model, or to infer it from other data (like the model path), so that we can know when the central model is inaccessible?

Jesika DiGregorio
Ideate Software
www.ideatesoftware.com
3 REPLIES 3
Message 2 of 4
jeremytammik
in reply to: JesikaD

Dear Jesika,

 

Thank you for your query.

 

I submitted the wish list item CF-2161 [API: ModelUpdatesStatus Enumeration lacks 'Central File Missing'] on your behalf for the functionality you suggest, as this issue requires exploration and possibly a modification to our software. Please make a note of this number for future reference.

 

Cheers,

 

Jeremy



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

Message 3 of 4
matthew_taylor
in reply to: JesikaD

FYI - This also throws the CentralFileCommunicationException exception:

 

Dim workSetInfo As IList(Of WorksetPreview) = WorksharingUtils.GetUserWorksetInfo(modelPath)

 

Each of these can be (minimally) checked for by searching for the file returned by BasicFileInfo.CentralPath


Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?
Message 4 of 4

Dear Matthew,

 

Thank you for the info.

 

I added it to the wish list item CF-2161 [API: ModelUpdatesStatus Enumeration lacks 'Central File Missing'].

 

I have not heard anything from the development team on it yet, though.

 

Cheers,

 

Jeremy



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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community