diff --git a/CHANGELOG.md b/CHANGELOG.md index 88456fe..3e58acf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [1.4.2] / 2025-01-16 ### Features - Add `ApplicationExtensions` to check `InAddInContext` and `InEventContext`. +- Add `DocumentCreated` event to confirm `ActiveAddInId` is null inside event. ### Updates - Update `Build` copy. diff --git a/DesignAutomationConsole/Bundle/RevitAddin.DA.Tester.bundle.zip b/DesignAutomationConsole/Bundle/RevitAddin.DA.Tester.bundle.zip index d6c15d1..9708d06 100644 Binary files a/DesignAutomationConsole/Bundle/RevitAddin.DA.Tester.bundle.zip and b/DesignAutomationConsole/Bundle/RevitAddin.DA.Tester.bundle.zip differ diff --git a/RevitAddin.DA.Tester/Services/DesignAutomationController.cs b/RevitAddin.DA.Tester/Services/DesignAutomationController.cs index 83f0b26..edfa6ea 100644 --- a/RevitAddin.DA.Tester/Services/DesignAutomationController.cs +++ b/RevitAddin.DA.Tester/Services/DesignAutomationController.cs @@ -48,6 +48,14 @@ public bool Execute(Application application, string filePath = null, Document do Console.WriteLine($"Shape Location:\t{typeof(ricaun.Revit.DB.Shape.Colors).Assembly.Location}"); Console.WriteLine("----------------------------------------"); + application.DocumentCreated += (s, e) => { + Console.WriteLine($"DocumentCreated:\t{e.Document.Title}"); + Console.WriteLine($"DocumentCreated.AddInName: \t{application.ActiveAddInId?.GetAddInName()}"); + Console.WriteLine("----------------------------------------"); + }; + + application.NewProjectDocument(UnitSystem.Metric); + return true; } }