I work in C# .Net and I use Revit api for a plugin in Revit .
I am currently using Revit Architecure 2012.
i am able to synchronize a local file up on clicking the "Synchronize option" in Revit by implementing "Document.SynchronizeWithCentral method"
I want to know is Can I invoke the method "Document.SynchronizeWithCentral method" on opening a local revit file ? (Autosynchronize while
opening a local revit file to central)
I want to do something like this
private void oCtrlApplication_DocumentOpened(object sender, DocumentOpenedEventArgs e)
{
try
{
oCtrlApplication_DocumentSynchronizingWithCentral(sender, e);
}
catch { }
}
Invoke the DocumentSynchronizingWithCentral event, when I open a revit local file to synchronize with the central file.
The above code will not work as I can not cast "DocumentOpenedEventArgs e" to the "DocumentSynchronizingWithCentralEventArgs e"
in DocumentSynchronizingWithCentral event.
Regards
Manosh Jacob