-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #127 from bvn-architecture/1.11.0-beta
v1.11.0 beta
- Loading branch information
Showing
23 changed files
with
621 additions
and
408 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="utf-8" standalone="no"?> | ||
<RevitAddIns> | ||
<AddIn Type="Application"> | ||
<Name>BatchRvtAddin</Name> | ||
<Assembly>.\BatchRvt\BatchRvtAddin2025.dll</Assembly> | ||
<AddInId>b57d22c8-5e1f-407a-86ea-a8615fd8df34</AddInId> | ||
<FullClassName>BatchRvt.Addin.Revit2025.BatchRvtAddinApplication</FullClassName> | ||
<VendorId>BATCHRVT</VendorId> | ||
</AddIn> | ||
</RevitAddIns> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net8.0-windows</TargetFramework> | ||
<OutputType>Library</OutputType> | ||
<RootNamespace>BatchRvtAddin2025</RootNamespace> | ||
<AssemblyName>BatchRvtAddin2025</AssemblyName> | ||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> | ||
|
||
|
||
<GenerateAssemblyInfo>true</GenerateAssemblyInfo> | ||
<Copyright>Copyright © 2024</Copyright> | ||
<Company>BVN</Company> | ||
<Product>BatchRvtAddin2025</Product> | ||
<AssemblyTitle>BatchRvtAddin2025</AssemblyTitle> | ||
<AssemblyVersion>1.0.0</AssemblyVersion> | ||
<FileVersion>1.0.0</FileVersion> | ||
|
||
<UseWindowsForms>true</UseWindowsForms> | ||
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets> | ||
<BaseOutputPath>bin\x64\</BaseOutputPath> | ||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<PlatformTarget>x64</PlatformTarget> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<OutputPath>bin\x64\Release\</OutputPath> | ||
<PlatformTarget>x64</PlatformTarget> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="FluentAssertions"> | ||
<Version>6.8.0</Version> | ||
</PackageReference> | ||
<PackageReference Include="IronPython" Version="2.7.12" /> | ||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" /> | ||
<PackageReference Include="Moq"> | ||
<Version>4.18.3</Version> | ||
</PackageReference> | ||
<PackageReference Include="Nice3point.Revit.Api.RevitAPI"> | ||
<Version>2025.2.0</Version> | ||
</PackageReference> | ||
<PackageReference Include="Nice3point.Revit.Api.RevitAPIUI"> | ||
<Version>2025.2.0</Version> | ||
</PackageReference> | ||
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" /> | ||
<PackageReference Include="xunit"> | ||
<Version>2.4.2</Version> | ||
</PackageReference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\BatchRvtScriptHost\BatchRvtScriptHost.csproj" /> | ||
<ProjectReference Include="..\BatchRvtUtil\BatchRvtUtil.csproj" /> | ||
</ItemGroup> | ||
|
||
<Target Name="PostBuild" AfterTargets="PostBuildEvent"> | ||
<Exec Command="call "$(ProjectDir)..\AddinDeployment\DeployAddin.bat" "$(ProjectDir)" "$(TargetDir)" "2025"" /> | ||
</Target> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
// | ||
// Revit Batch Processor | ||
// | ||
// Copyright (c) 2020 Daniel Rumery, BVN | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
// | ||
// | ||
|
||
using System; | ||
using System.ComponentModel; | ||
using System.IO; | ||
using Autodesk.Revit.ApplicationServices; | ||
using Autodesk.Revit.Attributes; | ||
using Autodesk.Revit.UI; | ||
using BatchRvt.ScriptHost; | ||
using WinForms = System.Windows.Forms; | ||
|
||
namespace BatchRvt.Addin.Revit2025 | ||
{ | ||
[Transaction(TransactionMode.Manual)] | ||
[Regeneration(RegenerationOption.Manual)] | ||
[DisplayName("BatchRvtAddin")] | ||
[Description("BatchRvtAddin")] | ||
public class BatchRvtAddinApplication : IExternalApplication | ||
{ | ||
public Result OnStartup(UIControlledApplication uiApplication) | ||
{ | ||
SetupBatchScriptHost(uiApplication.ControlledApplication); | ||
|
||
return Result.Succeeded; | ||
} | ||
|
||
public Result OnShutdown(UIControlledApplication application) | ||
{ | ||
return Result.Succeeded; | ||
} | ||
|
||
private static void SetupBatchScriptHost(ControlledApplication controlledApplication) | ||
{ | ||
var pluginFolderPath = Path.GetDirectoryName(typeof(BatchRvtAddinApplication).Assembly.Location); | ||
|
||
var batchRvtExternalEventHandler = new BatchRvtExternalEventHandler(pluginFolderPath); | ||
|
||
batchRvtExternalEventHandler.Raise(); | ||
} | ||
} | ||
|
||
public class BatchRvtExternalEventHandler : IExternalEventHandler | ||
{ | ||
private readonly ExternalEvent externalEvent_; | ||
private readonly string pluginFolderPath_; | ||
|
||
public BatchRvtExternalEventHandler(string pluginFolderPath) | ||
{ | ||
externalEvent_ = ExternalEvent.Create(this); | ||
pluginFolderPath_ = pluginFolderPath; | ||
} | ||
|
||
public void Execute(UIApplication uiApp) | ||
{ | ||
try | ||
{ | ||
ScriptHostUtil.ExecuteBatchScriptHost(pluginFolderPath_, uiApp); | ||
} | ||
catch (Exception e) | ||
{ | ||
WinForms.MessageBox.Show(e.ToString(), ScriptHostUtil.BATCH_RVT_ERROR_WINDOW_TITLE); | ||
} | ||
} | ||
|
||
public string GetName() | ||
{ | ||
return "BatchRvt_ExternalEventHandler"; | ||
} | ||
|
||
public ExternalEventRequest Raise() | ||
{ | ||
return externalEvent_.Raise(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"profiles": { | ||
"Revit 2025": { | ||
"commandName": "Executable", | ||
"executablePath": "C:\\Program Files\\Autodesk\\Revit 2025\\Revit.exe" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.