diff --git a/BCFExpress.sln b/BCFExpress.sln index 3241c85..d5d45b9 100644 --- a/BCFExpress.sln +++ b/BCFExpress.sln @@ -10,13 +10,15 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Build", "build\Build.csproj EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Installer|Any CPU = Installer|Any CPU Debug R22|Any CPU = Debug R22|Any CPU - Release R22|Any CPU = Release R22|Any CPU Debug R23|Any CPU = Debug R23|Any CPU - Release R23|Any CPU = Release R23|Any CPU Debug R24|Any CPU = Debug R24|Any CPU + Debug R25|Any CPU = Debug R25|Any CPU + Installer|Any CPU = Installer|Any CPU + Release R22|Any CPU = Release R22|Any CPU + Release R23|Any CPU = Release R23|Any CPU Release R24|Any CPU = Release R24|Any CPU + Release R25|Any CPU = Release R25|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {6E90E68F-336D-4EA9-8999-7076C3ACBD70}.Debug R22|Any CPU.ActiveCfg = Debug R22|Any CPU @@ -25,6 +27,8 @@ Global {6E90E68F-336D-4EA9-8999-7076C3ACBD70}.Debug R23|Any CPU.Build.0 = Debug R23|Any CPU {6E90E68F-336D-4EA9-8999-7076C3ACBD70}.Debug R24|Any CPU.ActiveCfg = Debug R24|Any CPU {6E90E68F-336D-4EA9-8999-7076C3ACBD70}.Debug R24|Any CPU.Build.0 = Debug R24|Any CPU + {6E90E68F-336D-4EA9-8999-7076C3ACBD70}.Debug R25|Any CPU.ActiveCfg = Debug R25|Any CPU + {6E90E68F-336D-4EA9-8999-7076C3ACBD70}.Debug R25|Any CPU.Build.0 = Debug R25|Any CPU {6E90E68F-336D-4EA9-8999-7076C3ACBD70}.Installer|Any CPU.ActiveCfg = Release R24|Any CPU {6E90E68F-336D-4EA9-8999-7076C3ACBD70}.Installer|Any CPU.Build.0 = Release R24|Any CPU {6E90E68F-336D-4EA9-8999-7076C3ACBD70}.Release R22|Any CPU.ActiveCfg = Release R22|Any CPU @@ -33,12 +37,16 @@ Global {6E90E68F-336D-4EA9-8999-7076C3ACBD70}.Release R23|Any CPU.Build.0 = Release R23|Any CPU {6E90E68F-336D-4EA9-8999-7076C3ACBD70}.Release R24|Any CPU.ActiveCfg = Release R24|Any CPU {6E90E68F-336D-4EA9-8999-7076C3ACBD70}.Release R24|Any CPU.Build.0 = Release R24|Any CPU + {6E90E68F-336D-4EA9-8999-7076C3ACBD70}.Release R25|Any CPU.ActiveCfg = Release R25|Any CPU + {6E90E68F-336D-4EA9-8999-7076C3ACBD70}.Release R25|Any CPU.Build.0 = Release R25|Any CPU {BEAB6AD1-084E-4AF0-B5BE-F95A468AE803}.Debug R22|Any CPU.ActiveCfg = Debug|Any CPU {BEAB6AD1-084E-4AF0-B5BE-F95A468AE803}.Debug R22|Any CPU.Build.0 = Debug|Any CPU {BEAB6AD1-084E-4AF0-B5BE-F95A468AE803}.Debug R23|Any CPU.ActiveCfg = Debug|Any CPU {BEAB6AD1-084E-4AF0-B5BE-F95A468AE803}.Debug R23|Any CPU.Build.0 = Debug|Any CPU {BEAB6AD1-084E-4AF0-B5BE-F95A468AE803}.Debug R24|Any CPU.ActiveCfg = Debug|Any CPU {BEAB6AD1-084E-4AF0-B5BE-F95A468AE803}.Debug R24|Any CPU.Build.0 = Debug|Any CPU + {BEAB6AD1-084E-4AF0-B5BE-F95A468AE803}.Debug R25|Any CPU.ActiveCfg = Debug|Any CPU + {BEAB6AD1-084E-4AF0-B5BE-F95A468AE803}.Debug R25|Any CPU.Build.0 = Debug|Any CPU {BEAB6AD1-084E-4AF0-B5BE-F95A468AE803}.Installer|Any CPU.ActiveCfg = Release|Any CPU {BEAB6AD1-084E-4AF0-B5BE-F95A468AE803}.Installer|Any CPU.Build.0 = Release|Any CPU {BEAB6AD1-084E-4AF0-B5BE-F95A468AE803}.Release R22|Any CPU.ActiveCfg = Release|Any CPU @@ -47,12 +55,16 @@ Global {BEAB6AD1-084E-4AF0-B5BE-F95A468AE803}.Release R23|Any CPU.Build.0 = Release|Any CPU {BEAB6AD1-084E-4AF0-B5BE-F95A468AE803}.Release R24|Any CPU.ActiveCfg = Release|Any CPU {BEAB6AD1-084E-4AF0-B5BE-F95A468AE803}.Release R24|Any CPU.Build.0 = Release|Any CPU + {BEAB6AD1-084E-4AF0-B5BE-F95A468AE803}.Release R25|Any CPU.ActiveCfg = Release|Any CPU + {BEAB6AD1-084E-4AF0-B5BE-F95A468AE803}.Release R25|Any CPU.Build.0 = Release|Any CPU {57877EDE-8358-4D99-A3BB-BE47BE1B5EDB}.Debug R22|Any CPU.ActiveCfg = Debug|Any CPU {57877EDE-8358-4D99-A3BB-BE47BE1B5EDB}.Debug R22|Any CPU.Build.0 = Debug|Any CPU {57877EDE-8358-4D99-A3BB-BE47BE1B5EDB}.Debug R23|Any CPU.ActiveCfg = Debug|Any CPU {57877EDE-8358-4D99-A3BB-BE47BE1B5EDB}.Debug R23|Any CPU.Build.0 = Debug|Any CPU {57877EDE-8358-4D99-A3BB-BE47BE1B5EDB}.Debug R24|Any CPU.ActiveCfg = Debug|Any CPU {57877EDE-8358-4D99-A3BB-BE47BE1B5EDB}.Debug R24|Any CPU.Build.0 = Debug|Any CPU + {57877EDE-8358-4D99-A3BB-BE47BE1B5EDB}.Debug R25|Any CPU.ActiveCfg = Debug|Any CPU + {57877EDE-8358-4D99-A3BB-BE47BE1B5EDB}.Debug R25|Any CPU.Build.0 = Debug|Any CPU {57877EDE-8358-4D99-A3BB-BE47BE1B5EDB}.Installer|Any CPU.ActiveCfg = Release|Any CPU {57877EDE-8358-4D99-A3BB-BE47BE1B5EDB}.Installer|Any CPU.Build.0 = Release|Any CPU {57877EDE-8358-4D99-A3BB-BE47BE1B5EDB}.Release R22|Any CPU.ActiveCfg = Release|Any CPU @@ -61,6 +73,8 @@ Global {57877EDE-8358-4D99-A3BB-BE47BE1B5EDB}.Release R23|Any CPU.Build.0 = Release|Any CPU {57877EDE-8358-4D99-A3BB-BE47BE1B5EDB}.Release R24|Any CPU.ActiveCfg = Release|Any CPU {57877EDE-8358-4D99-A3BB-BE47BE1B5EDB}.Release R24|Any CPU.Build.0 = Release|Any CPU + {57877EDE-8358-4D99-A3BB-BE47BE1B5EDB}.Release R25|Any CPU.ActiveCfg = Release|Any CPU + {57877EDE-8358-4D99-A3BB-BE47BE1B5EDB}.Release R25|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/BCFExpress/Application.cs b/BCFExpress/Application.cs index f8d157a..e134e21 100644 --- a/BCFExpress/Application.cs +++ b/BCFExpress/Application.cs @@ -1,106 +1,113 @@ -using Autodesk.Revit.UI; -using BCFExpress.Handlers; -using BCFExpress.Models; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Reflection; -using System.Text; -using System.Threading.Tasks; - -namespace BCFExpress -{ - internal class Application:IExternalApplication - { - static readonly string tabName = "BCF Express"; - - - public Result OnShutdown(UIControlledApplication application) - { - return Result.Succeeded; - } - - public Result OnStartup(UIControlledApplication app) - { - try - { - RevitModel.MdlExternalEventHandler = new MdlExternalEventHandler(); - AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(AssemblyResolve); - app.ViewActivated += App_ViewActivated; - - app.CreateRibbonTab(tabName); - - var panel = app.GetOrCreateRibbonPanel(tabName, "BCF Express"); - - var textbtndata = new PushButtonDataModel() - { - BtnName = "Open", - Panel = panel, - Tooltip = "This addin helps you to \n Export data to exel sheet", - IconImageName = "bcf.png", - // TooltipImageName = "5.PNG", - CommandNameSpacePath = Command.GetPath(), - - }; - var textbtndata2 = new PushButtonDataModel() - { - BtnName = "Setting", - Panel = panel, - Tooltip = "This addin helps you to \n Export data to exel sheet", - IconImageName = "setting.png", - // TooltipImageName = "5.PNG", - - CommandNameSpacePath = CommandSetting.GetPath(), - - }; - - _ = RevitPushButton.CreatePushButton(textbtndata); - _ = RevitPushButton.CreatePushButton(textbtndata2); - - return Result.Succeeded; - - } - catch (Exception m) - { - - TaskDialog.Show("Error", m.Message); - - return Result.Failed; - } - - - } - - private void App_ViewActivated(object sender, Autodesk.Revit.UI.Events.ViewActivatedEventArgs e) - { - - RevitModel.UIApplication = sender as UIApplication; - } - - private Assembly AssemblyResolve(object sender, ResolveEventArgs args) - { - int position = args.Name.IndexOf(","); - if (position > -1) - { - try - { - string assemblyName = args.Name.Substring(0, position); - string assemblyFullPath = string.Empty; - - //look in main folder - assemblyFullPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\" + assemblyName + ".dll"; - if (File.Exists(assemblyFullPath)) - return Assembly.LoadFrom(assemblyFullPath); - } - catch (Exception ex) - { - System.Diagnostics.Debug.WriteLine(ex.Message); - } - } - return null; - } - - - } -} +using Autodesk.Revit.UI; +using BCFExpress.Handlers; +using BCFExpress.Models; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace BCFExpress +{ + internal class Application:IExternalApplication + { + static readonly string tabName = "BCF Express"; + + + public Result OnShutdown(UIControlledApplication application) + { + return Result.Succeeded; + } + + public Result OnStartup(UIControlledApplication app) + { + try + { + RevitModel.MdlExternalEventHandler = new MdlExternalEventHandler(); + AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(AssemblyResolve); + app.ViewActivated += App_ViewActivated; + + try + { + app.CreateRibbonTab(tabName); + } + catch (Exception ex) + { + System.Diagnostics.Debug.WriteLine(ex.Message); + } + + var panel = app.GetOrCreateRibbonPanel(tabName, "BCF Express"); + + var textbtndata = new PushButtonDataModel() + { + BtnName = "Open", + Panel = panel, + Tooltip = "This addin helps you to \n Export data to exel sheet", + IconImageName = "bcf.png", + // TooltipImageName = "5.PNG", + CommandNameSpacePath = Command.GetPath(), + + }; + var textbtndata2 = new PushButtonDataModel() + { + BtnName = "Setting", + Panel = panel, + Tooltip = "This addin helps you to \n Export data to exel sheet", + IconImageName = "setting.png", + // TooltipImageName = "5.PNG", + + CommandNameSpacePath = CommandSetting.GetPath(), + + }; + + _ = RevitPushButton.CreatePushButton(textbtndata); + _ = RevitPushButton.CreatePushButton(textbtndata2); + + return Result.Succeeded; + + } + catch (Exception m) + { + + TaskDialog.Show("Error", m.Message); + + return Result.Failed; + } + + + } + + private void App_ViewActivated(object sender, Autodesk.Revit.UI.Events.ViewActivatedEventArgs e) + { + + RevitModel.UIApplication = sender as UIApplication; + } + + private Assembly AssemblyResolve(object sender, ResolveEventArgs args) + { + int position = args.Name.IndexOf(","); + if (position > -1) + { + try + { + string assemblyName = args.Name.Substring(0, position); + string assemblyFullPath = string.Empty; + + //look in main folder + assemblyFullPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\" + assemblyName + ".dll"; + if (File.Exists(assemblyFullPath)) + return Assembly.LoadFrom(assemblyFullPath); + } + catch (Exception ex) + { + System.Diagnostics.Debug.WriteLine(ex.Message); + } + } + return null; + } + + + } +} diff --git a/BCFExpress/BCFExpress.csproj b/BCFExpress/BCFExpress.csproj index 0619553..0240cd2 100644 --- a/BCFExpress/BCFExpress.csproj +++ b/BCFExpress/BCFExpress.csproj @@ -1,107 +1,105 @@ - - - true - latest - x64 - net48 - Debug R21;Debug R22;Debug R23;Debug R24 - $(Configurations);Release R21;Release R22;Release R23;Release R24 - - - true - true - false - - - full - true - $(DefineConstants);DEBUG - - - true - none - $(DefineConstants);RELEASE - - - 2021 - $(DefineConstants);R21 - $(DefineConstants);R21_OR_GREATER - - - 2022 - $(DefineConstants);R22 - $(DefineConstants);R21_OR_GREATER;R22_OR_GREATER - - - 2023 - $(DefineConstants);R23 - $(DefineConstants);R21_OR_GREATER;R22_OR_GREATER;R23_OR_GREATER - - - 2024 - $(DefineConstants);R24 - $(DefineConstants);R21_OR_GREATER;R22_OR_GREATER;R23_OR_GREATER;R24_OR_GREATER - - - - Program - C:\Program Files\Autodesk\Revit $(RevitVersion)\Revit.exe - /language ENG - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bin\$(RevitVersion) $(Configuration)\ - $(RootDir)$(AssemblyName)\ - - - - - - - - - - - + + + true + latest + x64 + AnyCPU;x64 + Debug R21;Debug R22;Debug R23;Debug R24;Debug R25 + $(Configurations);Release R21;Release R22;Release R23;Release R24;Release R25 + true + true + false + + + + 2019 + net471 + + + 2020 + net472 + + + 2021 + net48 + + + 2022 + net48 + + + 2023 + net48 + + + 2024 + net48 + + + 2025 + net8.0-windows + + + + Program + C:\Program Files\Autodesk\Revit $(RevitVersion)\Revit.exe + /language ENG + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bin\$(RevitVersion) $(Configuration)\ + $(RootDir)$(AssemblyName)\ + + + + + + + + \ No newline at end of file diff --git a/BCFExpress/Themes/ScrollViewer.xaml b/BCFExpress/Themes/ScrollViewer.xaml index 36134d1..e881cd5 100644 --- a/BCFExpress/Themes/ScrollViewer.xaml +++ b/BCFExpress/Themes/ScrollViewer.xaml @@ -1,7 +1,7 @@  + xmlns:themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"> diff --git a/README.md b/README.md index 1fba69b..393ad53 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,7 @@ A Revit plugin that enables quick and easy navigation of BCF issues in Revit. It simplifies the issue structure required in the BCF by Navigating the contained elements. - [BCFExpress Overview](https://www.youtube.com/watch?v=Qi_aMko68iE) - - +## Credits +Pretty much all credit for the build + install code goes to the contributers of [RevitLookup](https://github.com/jeremytammik/RevitLookup), namely @Nice3point and @jeremytammik. Thanks to them! \ No newline at end of file diff --git a/build/Build.Compile.cs b/build/Build.Compile.cs index 1631bb1..d33d073 100644 --- a/build/Build.Compile.cs +++ b/build/Build.Compile.cs @@ -16,7 +16,7 @@ sealed partial class Build DotNetBuild(settings => settings .SetConfiguration(configuration) .SetVersion(value) - .SetVerbosity(DotNetVerbosity.Minimal)); + .SetVerbosity(DotNetVerbosity.quiet)); } }); diff --git a/build/Build.Configuration.cs b/build/Build.Configuration.cs index 17e02e4..ad9d99c 100644 --- a/build/Build.Configuration.cs +++ b/build/Build.Configuration.cs @@ -20,12 +20,14 @@ protected override void OnBuildInitialized() VersionMap = new() { - {"Release R19", "2019.0.1"}, - {"Release R20", "2020.0.1"}, - {"Release R21", "2021.0.1"}, - {"Release R22", "2022.0.1"}, - {"Release R23", "2023.0.1"}, - {"Release R24", "2024.0.1"} + {"Release R19", "2019.0.2"}, + {"Release R20", "2020.0.2"}, + {"Release R21", "2021.0.2"}, + {"Release R22", "2022.0.2"}, + {"Release R23", "2023.0.2"}, + {"Release R24", "2024.0.2"}, + {"Release R25", "2025.0.2"}, + {"Installer", "1"} }; } } \ No newline at end of file diff --git a/build/Build.csproj b/build/Build.csproj index cdff836..d749fa6 100644 --- a/build/Build.csproj +++ b/build/Build.csproj @@ -5,7 +5,7 @@ CS0649;CS0169 latest true - net7.0 + net8.0 .. .. 1 @@ -14,7 +14,7 @@ - + \ No newline at end of file diff --git a/install/Installer.cs b/install/Installer.cs index 473f3a1..95a6707 100644 --- a/install/Installer.cs +++ b/install/Installer.cs @@ -16,7 +16,8 @@ {2021, "2F2060FC-4821-45B2-9EDE-84ED05BFC00B"}, {2022, "145E368C-9BE0-4653-BC41-BD309DCE9C05"}, {2023, "00645EC4-0A1A-4B07-97D7-BA59F1F74E5B"}, - {2024, "173BFCD1-AF84-4248-A44F-A5CBFC6B4F32"} + {2024, "173BFCD1-AF84-4248-A44F-A5CBFC6B4F32"}, + {2025, "2AD9A32F-1C82-4AA0-BFC4-B67D28464916"} }; var versions = Tools.ComputeVersions(args);