Skip to content

Commit

Permalink
Add AddInId in the output.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricaun committed Jun 15, 2024
1 parent 9251df2 commit ba9a172
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [1.3.1] / 2025-06-15
- Add `AddInId` in the output.

## [1.3.0] / 2025-04-05
- Update to Revit 2025
- Build `DesignAutomationConsole`.
Expand All @@ -26,6 +29,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- First Release

[vNext]: ../../compare/1.0.0...HEAD
[1.3.1]: ../../compare/1.3.0...1.3.1
[1.3.0]: ../../compare/1.2.0...1.3.0
[1.2.0]: ../../compare/1.1.0...1.2.0
[1.1.0]: ../../compare/1.0.0...1.1.0
Expand Down
Binary file modified DesignAutomationConsole/Bundle/RevitAddin.DA.Tester.bundle.zip
Binary file not shown.
1 change: 1 addition & 0 deletions DesignAutomationConsole/Models/OutputModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace DesignAutomationConsole.Models
{
public class OutputModel
{
public string AddInId { get; set; }
public string VersionName { get; set; }
public string VersionBuild { get; set; }
public DateTime TimeStart { get; set; } = DateTime.UtcNow;
Expand Down
4 changes: 2 additions & 2 deletions DesignAutomationConsole/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ private static async Task DA_RevitAddin_DA_Tester()
EngineVersions = new[] {
//"2019",
//"2020",
//"2021",
"2021",
//"2022",
//"2023",
//"2024",
"2025",
//"2025",
},
EnableConsoleLogger = true,
//EnableParameterConsoleLogger = true,
Expand Down
1 change: 1 addition & 0 deletions RevitAddin.DA.Tester/Models/OutputModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace RevitAddin.DA.Tester.Models
{
public class OutputModel
{
public string AddInId { get; set; }
public string VersionName { get; set; }
public string VersionBuild { get; set; }
public DateTime TimeStart { get; set; } = DateTime.UtcNow;
Expand Down
6 changes: 4 additions & 2 deletions RevitAddin.DA.Tester/Revit/App.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ public class App : IExternalDBApplication
public ExternalDBApplicationResult OnStartup(ControlledApplication application)
{
Console.WriteLine("----------------------------------------");
Console.WriteLine(this.GetType().Assembly.FullName);
Console.WriteLine($"FullName: \t{this.GetType().Assembly.FullName}");
Console.WriteLine("----------------------------------------");
Console.WriteLine(this.GetType().Assembly.Location);
Console.WriteLine($"Location: {this.GetType().Assembly.Location}");
Console.WriteLine("----------------------------------------");
Console.WriteLine($"AddInId: \t{application.ActiveAddInId?.GetAddInName()}");
Console.WriteLine("----------------------------------------");

DesignAutomationBridge.DesignAutomationReadyEvent += DesignAutomationBridge_DesignAutomationReadyEvent;
Expand Down
2 changes: 2 additions & 0 deletions RevitAddin.DA.Tester/Services/DesignAutomationController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public static bool Execute(Application application, string filePath = null, Docu
var inputModel = new InputModel().Load();

var outputModel = new OutputModel();
outputModel.AddInId = application.ActiveAddInId?.GetAddInName();
outputModel.VersionBuild = application.VersionBuild;
outputModel.VersionName = application.VersionName;
outputModel.Reference = outputModel.GetType().Assembly.GetReferencedAssemblies().FirstOrDefault(e => e.Name.Contains("RevitAPI"))?.Version.ToString();
Expand All @@ -24,6 +25,7 @@ public static bool Execute(Application application, string filePath = null, Docu
outputModel.Save();

Console.WriteLine("----------------------------------------");
Console.WriteLine($"AddInId: \t{application.ActiveAddInId?.GetAddInName()}");
Console.WriteLine($"Input:\t{inputModel}");
Console.WriteLine($"Output:\t{outputModel}");
Console.WriteLine("----------------------------------------");
Expand Down

0 comments on commit ba9a172

Please sign in to comment.