Skip to content

Commit 40cdc5c

Browse files
Merge pull request #100 from bvn-architecture/v1.9.0-beta
v1.9.0 beta
2 parents 0f6a2fd + 4e4acf1 commit 40cdc5c

21 files changed

+309510
-90
lines changed

AddinDeployment/RemoveAddinAllVersions.bat

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ echo.
3434
echo Removing BatchRvt addin for Revit 2022
3535
call RemoveAddin.bat 2022
3636

37+
echo.
38+
echo Removing BatchRvt addin for Revit 2023
39+
call RemoveAddin.bat 2023
40+
3741
echo Done.
3842
echo.
3943

BatchRevitDynamo/RevitBatchProcessor.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,8 @@ public enum UseRevitVersion {
210210
Revit2019 = 5,
211211
Revit2020 = 6,
212212
Revit2021 = 7,
213-
Revit2022 = 8
213+
Revit2022 = 8,
214+
Revit2023 = 9
214215
}
215216
public enum RevitSessionOption { UseSeparateSessionPerFile = 0, UseSameSessionForFilesOfSameVersion = 1 }
216217
public enum CentralFileOpenOption { Detach = 0, CreateNewLocal = 1 }

BatchRvt/BatchRvt.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
<HintPath>..\References\IronPython-2.7.3\Microsoft.Scripting.Metadata.dll</HintPath>
6363
<Private>True</Private>
6464
</Reference>
65+
<Reference Include="Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
6566
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
6667
<SpecificVersion>False</SpecificVersion>
6768
<HintPath>..\References\JSON.NET\Newtonsoft.Json.dll</HintPath>
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="no"?>
2+
<RevitAddIns>
3+
<AddIn Type="Application">
4+
<Name>BatchRvtAddin</Name>
5+
<Assembly>.\BatchRvt\BatchRvtAddin2023.dll</Assembly>
6+
<AddInId>b57d22c8-5e1f-407a-86ea-a8615fd8df34</AddInId>
7+
<FullClassName>BatchRvt.Addin.Revit2023.BatchRvtAddinApplication</FullClassName>
8+
<VendorId>BATCHRVT</VendorId>
9+
</AddIn>
10+
</RevitAddIns>
+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{60C3C457-D35A-4343-A906-01CF666DC75E}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>BatchRvt.Addin.Revit2023</RootNamespace>
11+
<AssemblyName>BatchRvtAddin2023</AssemblyName>
12+
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<Deterministic>true</Deterministic>
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<DebugSymbols>true</DebugSymbols>
18+
<OutputPath>bin\x64\Debug\</OutputPath>
19+
<DefineConstants>DEBUG;TRACE</DefineConstants>
20+
<DebugType>full</DebugType>
21+
<PlatformTarget>x64</PlatformTarget>
22+
<LangVersion>7.3</LangVersion>
23+
<ErrorReport>prompt</ErrorReport>
24+
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
25+
</PropertyGroup>
26+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27+
<OutputPath>bin\x64\Release\</OutputPath>
28+
<DefineConstants>TRACE</DefineConstants>
29+
<Optimize>true</Optimize>
30+
<DebugType>pdbonly</DebugType>
31+
<PlatformTarget>x64</PlatformTarget>
32+
<LangVersion>7.3</LangVersion>
33+
<ErrorReport>prompt</ErrorReport>
34+
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
35+
</PropertyGroup>
36+
<ItemGroup>
37+
<Reference Include="IronPython, Version=2.7.0.40, Culture=neutral, PublicKeyToken=7f709c5b713576e1, processorArchitecture=MSIL">
38+
<SpecificVersion>False</SpecificVersion>
39+
<HintPath>..\References\IronPython-2.7.3\IronPython.dll</HintPath>
40+
</Reference>
41+
<Reference Include="IronPython.Modules, Version=2.7.0.40, Culture=neutral, PublicKeyToken=7f709c5b713576e1, processorArchitecture=MSIL">
42+
<SpecificVersion>False</SpecificVersion>
43+
<HintPath>..\References\IronPython-2.7.3\IronPython.Modules.dll</HintPath>
44+
</Reference>
45+
<Reference Include="Microsoft.Dynamic, Version=1.1.0.20, Culture=neutral, PublicKeyToken=7f709c5b713576e1, processorArchitecture=MSIL">
46+
<SpecificVersion>False</SpecificVersion>
47+
<HintPath>..\References\IronPython-2.7.3\Microsoft.Dynamic.dll</HintPath>
48+
</Reference>
49+
<Reference Include="Microsoft.Scripting, Version=1.1.0.20, Culture=neutral, PublicKeyToken=7f709c5b713576e1, processorArchitecture=MSIL">
50+
<SpecificVersion>False</SpecificVersion>
51+
<HintPath>..\References\IronPython-2.7.3\Microsoft.Scripting.dll</HintPath>
52+
</Reference>
53+
<Reference Include="Microsoft.Scripting.Metadata, Version=1.1.0.20, Culture=neutral, PublicKeyToken=7f709c5b713576e1, processorArchitecture=MSIL">
54+
<SpecificVersion>False</SpecificVersion>
55+
<HintPath>..\References\IronPython-2.7.3\Microsoft.Scripting.Metadata.dll</HintPath>
56+
</Reference>
57+
<Reference Include="RevitAPI">
58+
<HintPath>..\References\Revit\2023\RevitAPI.dll</HintPath>
59+
<Private>False</Private>
60+
</Reference>
61+
<Reference Include="RevitAPIUI">
62+
<HintPath>..\References\Revit\2023\RevitAPIUI.dll</HintPath>
63+
<Private>False</Private>
64+
</Reference>
65+
<Reference Include="System" />
66+
<Reference Include="System.Core" />
67+
<Reference Include="System.Windows.Forms" />
68+
<Reference Include="Microsoft.CSharp" />
69+
</ItemGroup>
70+
<ItemGroup>
71+
<Compile Include="..\Common\GlobalAssemblyInfo.cs">
72+
<Link>Properties\GlobalAssemblyInfo.cs</Link>
73+
</Compile>
74+
<Compile Include="BatchRvtAddinApplication.cs" />
75+
<Compile Include="Properties\AssemblyInfo.cs" />
76+
</ItemGroup>
77+
<ItemGroup>
78+
<ProjectReference Include="..\BatchRvtScriptHost\BatchRvtScriptHost.csproj">
79+
<Project>{673d1fb5-cfb2-4bdf-9609-c43979dd7197}</Project>
80+
<Name>BatchRvtScriptHost</Name>
81+
</ProjectReference>
82+
</ItemGroup>
83+
<ItemGroup>
84+
<Content Include="BatchRvtAddin2023.addin" />
85+
</ItemGroup>
86+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
87+
<PropertyGroup>
88+
<PostBuildEvent>call "$(ProjectDir)..\AddinDeployment\DeployAddin.bat" "$(ProjectDir)" "$(TargetDir)" "2023"</PostBuildEvent>
89+
</PropertyGroup>
90+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
//
2+
// Revit Batch Processor
3+
//
4+
// Copyright (c) 2020 Daniel Rumery, BVN
5+
//
6+
// This program is free software: you can redistribute it and/or modify
7+
// it under the terms of the GNU General Public License as published by
8+
// the Free Software Foundation, either version 3 of the License, or
9+
// (at your option) any later version.
10+
//
11+
// This program is distributed in the hope that it will be useful,
12+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
// GNU General Public License for more details.
15+
//
16+
// You should have received a copy of the GNU General Public License
17+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
//
19+
//
20+
using System;
21+
using System.Collections.Generic;
22+
using System.Linq;
23+
using System.ComponentModel;
24+
using System.IO;
25+
using WinForms = System.Windows.Forms;
26+
using Autodesk.Revit.UI;
27+
using Autodesk.Revit.Attributes;
28+
using Autodesk.Revit.ApplicationServices;
29+
30+
using BatchRvt.ScriptHost;
31+
32+
namespace BatchRvt.Addin.Revit2023
33+
{
34+
[Transaction(TransactionMode.Manual)]
35+
[Regeneration(RegenerationOption.Manual)]
36+
[DisplayName("BatchRvtAddin")]
37+
[Description("BatchRvtAddin")]
38+
public class BatchRvtAddinApplication : IExternalApplication
39+
{
40+
private static void SetupBatchScriptHost(ControlledApplication controlledApplication)
41+
{
42+
var pluginFolderPath = Path.GetDirectoryName(typeof(BatchRvtAddinApplication).Assembly.Location);
43+
44+
var batchRvtExternalEventHandler = new BatchRvtExternalEventHandler(pluginFolderPath);
45+
46+
batchRvtExternalEventHandler.Raise();
47+
}
48+
49+
public Result OnStartup(UIControlledApplication uiApplication)
50+
{
51+
SetupBatchScriptHost(uiApplication.ControlledApplication);
52+
53+
return Result.Succeeded;
54+
}
55+
56+
public Result OnShutdown(UIControlledApplication application)
57+
{
58+
return Result.Succeeded;
59+
}
60+
}
61+
62+
public class BatchRvtExternalEventHandler : IExternalEventHandler
63+
{
64+
private readonly ExternalEvent externalEvent_;
65+
private readonly string pluginFolderPath_;
66+
67+
public BatchRvtExternalEventHandler(string pluginFolderPath)
68+
{
69+
this.externalEvent_ = ExternalEvent.Create(this);
70+
this.pluginFolderPath_ = pluginFolderPath;
71+
}
72+
73+
public void Execute(UIApplication uiApp)
74+
{
75+
try
76+
{
77+
ScriptHostUtil.ExecuteBatchScriptHost(this.pluginFolderPath_, uiApp);
78+
}
79+
catch (Exception e)
80+
{
81+
WinForms.MessageBox.Show(e.ToString(), ScriptHostUtil.BATCH_RVT_ERROR_WINDOW_TITLE);
82+
}
83+
}
84+
85+
public string GetName()
86+
{
87+
return "BatchRvt_ExternalEventHandler";
88+
}
89+
90+
public ExternalEventRequest Raise()
91+
{
92+
return this.externalEvent_.Raise();
93+
}
94+
}
95+
}
96+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("BatchRvtAddin2023")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("BVN")]
12+
[assembly: AssemblyProduct("BatchRvtAddin2023")]
13+
[assembly: AssemblyCopyright("Copyright © BVN 2022")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("60c3c457-d35a-4343-a906-01cf666dc75e")]

BatchRvtGUI/BVN32NewBrand.ico

401 KB
Binary file not shown.

BatchRvtGUI/BatchRvtGUI.csproj

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<FileAlignment>512</FileAlignment>
1414
</PropertyGroup>
1515
<PropertyGroup>
16-
<ApplicationIcon>BVN32new.ico</ApplicationIcon>
16+
<ApplicationIcon>BVN32NewBrand.ico</ApplicationIcon>
1717
</PropertyGroup>
1818
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
1919
<DebugSymbols>true</DebugSymbols>
@@ -149,6 +149,7 @@
149149
</ItemGroup>
150150
<ItemGroup>
151151
<Content Include="BVN32new.ico" />
152+
<Content Include="BVN32NewBrand.ico" />
152153
<EmbeddedResource Include="Images\BVN16new.ico" />
153154
</ItemGroup>
154155
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

BatchRvtUtil/BatchRvt.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ public enum WorksetConfigurationOption { CloseAllWorksets = 0, OpenAllWorksets =
5252
{ RevitVersion.SupportedRevitVersion.Revit2019, "BatchRvtAddin2019.addin" },
5353
{ RevitVersion.SupportedRevitVersion.Revit2020, "BatchRvtAddin2020.addin" },
5454
{ RevitVersion.SupportedRevitVersion.Revit2021, "BatchRvtAddin2021.addin" },
55-
{ RevitVersion.SupportedRevitVersion.Revit2022, "BatchRvtAddin2022.addin" }
55+
{ RevitVersion.SupportedRevitVersion.Revit2022, "BatchRvtAddin2022.addin" },
56+
{ RevitVersion.SupportedRevitVersion.Revit2023, "BatchRvtAddin2023.addin" }
5657
};
5758

5859
private static string ConstructCommandLineArguments(IEnumerable<KeyValuePair<string, string>> arguments)

BatchRvtUtil/BatchRvtTasks.cs

+5-2
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,9 @@ string testModeFolderPath
174174
RevitVersion.SupportedRevitVersion.Revit2020 :
175175
useRevitVersion == UseRevitVersion.Revit2021 ?
176176
RevitVersion.SupportedRevitVersion.Revit2021 :
177-
RevitVersion.SupportedRevitVersion.Revit2022
177+
useRevitVersion == UseRevitVersion.Revit2022 ?
178+
RevitVersion.SupportedRevitVersion.Revit2022 :
179+
RevitVersion.SupportedRevitVersion.Revit2023
178180

179181
);
180182

@@ -308,7 +310,8 @@ public enum UseRevitVersion {
308310
Revit2019 = 5,
309311
Revit2020 = 6,
310312
Revit2021 = 7,
311-
Revit2022 = 8
313+
Revit2022 = 8,
314+
Revit2023 = 9
312315
}
313316
}
314317
}

0 commit comments

Comments
 (0)