Obtain Sync With Central Number Via API?

Obtain Sync With Central Number Via API?

DJB_CADfx
Enthusiast Enthusiast
582 Views
2 Replies
Message 1 of 3

Obtain Sync With Central Number Via API?

DJB_CADfx
Enthusiast
Enthusiast

When using a Workshared environment, a *.slog file is created in the Backup sub-folder. Each time a sync with central occurs, a line is written in the slog file that contains the Number of that particular synchronization (starts at 1 and increments up each time another sync is performed).

 

We have a Revit addin that fires upon Sync Completion. Is there any way from that event to make an API call that will tell us what the specific number of that Sync was that just occurred? (We would like to stay away from reading the file itself if possible so we don't run into any of the problems associated with file system reading in a multi-user environment like this.)

 

Thanks,

 

Dave Blackburn

0 Likes
Accepted solutions (1)
583 Views
2 Replies
Replies (2)
Message 2 of 3

dantartaglia8696
Advocate
Advocate

Hi Dave,

 

I do not believe so except to either keep a counter in your logic or read the slog file when a sync happens.

 

Dan Tartaglia

Message 3 of 3

JimJia
Alumni
Alumni
Accepted solution
Dear David Blackburn,

Please accept our sincerer apology for the delay! We had a backlog in the queue these days.

Revit API doesn't provide such API except events DocumentSynchronizingWithCentralEventArgs and DocumentSynchronizedWithCentralEventArgs which doesn't provide Number option you desired, sorry if this is a bad news to you.

However, it should not be problem to read file with multi users, you can refer to this stakoverflow page or similar: http://stackoverflow.com/questions/3527205/multiple-threads-reading-from-the-same-file

Hope it's helpful.

Jim Jia
Autodesk Forge Evangelist
https://forge.autodesk.com
Developer Technical Services
Autodesk Developer Network
Email: Jim.Jia@autodesk.com
0 Likes