start
Autodesk.Revit.DB.Events;
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
[Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)]
[Autodesk.Revit.Attributes.Journaling(Autodesk.Revit.Attributes.JournalingMode.NoCommandData)]
App : IExternalApplication
{
Autodesk.Revit.UI.Result OnStartup(UIControlledApplication application)
{
application.ControlledApplication.DocumentChanged += EventHandler<DocumentChangedEventArgs>(app_Doc_Change);
Autodesk.Revit.UI.Result.Succeeded;
}
Autodesk.Revit.UI.Result OnShutdown(UIControlledApplication application)
{
Autodesk.Revit.UI.Result.Succeeded;
}
app_Doc_Change( sender, DocumentChangedEventArgs args)
{
Document doc = args.GetDocument();
TaskDialog.Show(, doc.PathName);
}
}end