//This function is called not only when document is being closed but also when
        //anything changes in collaboration work sets. Unregistering updater is undesirable in that case
        void ControlledApplication_DocumentClosing(object sender, Autodesk.Revit.DB.Events.DocumentClosingEventArgs e)
        {
            ////unregister updaters
            //var app = sender as Application;
            //var updater = new GuidUpdater(app.ActiveAddInId);

            //if (UpdaterRegistry.IsUpdaterRegistered(updater.GetUpdaterId()))
            //    UpdaterRegistry.UnregisterUpdater(updater.GetUpdaterId());
        }
Ejemplo n.º 2
0
 void doc_DocumentClosing(object sender, Autodesk.Revit.DB.Events.DocumentClosingEventArgs e)
 {
     DisplayEvent("Document closing");
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Handler for Revit's DocumentClosing event.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnApplicationDocumentClosing(object sender, Autodesk.Revit.DB.Events.DocumentClosingEventArgs e)
 {
     HandleApplicationDocumentClosing(e.Document);
 }