-
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 #100 from bvn-architecture/v1.9.0-beta
v1.9.0 beta
- Loading branch information
Showing
21 changed files
with
309,510 additions
and
90 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
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\BatchRvtAddin2023.dll</Assembly> | ||
<AddInId>b57d22c8-5e1f-407a-86ea-a8615fd8df34</AddInId> | ||
<FullClassName>BatchRvt.Addin.Revit2023.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,90 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{60C3C457-D35A-4343-A906-01CF666DC75E}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>BatchRvt.Addin.Revit2023</RootNamespace> | ||
<AssemblyName>BatchRvtAddin2023</AssemblyName> | ||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<Deterministic>true</Deterministic> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<OutputPath>bin\x64\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<DebugType>full</DebugType> | ||
<PlatformTarget>x64</PlatformTarget> | ||
<LangVersion>7.3</LangVersion> | ||
<ErrorReport>prompt</ErrorReport> | ||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<OutputPath>bin\x64\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<Optimize>true</Optimize> | ||
<DebugType>pdbonly</DebugType> | ||
<PlatformTarget>x64</PlatformTarget> | ||
<LangVersion>7.3</LangVersion> | ||
<ErrorReport>prompt</ErrorReport> | ||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="IronPython, Version=2.7.0.40, Culture=neutral, PublicKeyToken=7f709c5b713576e1, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>..\References\IronPython-2.7.3\IronPython.dll</HintPath> | ||
</Reference> | ||
<Reference Include="IronPython.Modules, Version=2.7.0.40, Culture=neutral, PublicKeyToken=7f709c5b713576e1, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>..\References\IronPython-2.7.3\IronPython.Modules.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Microsoft.Dynamic, Version=1.1.0.20, Culture=neutral, PublicKeyToken=7f709c5b713576e1, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>..\References\IronPython-2.7.3\Microsoft.Dynamic.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Microsoft.Scripting, Version=1.1.0.20, Culture=neutral, PublicKeyToken=7f709c5b713576e1, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>..\References\IronPython-2.7.3\Microsoft.Scripting.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Microsoft.Scripting.Metadata, Version=1.1.0.20, Culture=neutral, PublicKeyToken=7f709c5b713576e1, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>..\References\IronPython-2.7.3\Microsoft.Scripting.Metadata.dll</HintPath> | ||
</Reference> | ||
<Reference Include="RevitAPI"> | ||
<HintPath>..\References\Revit\2023\RevitAPI.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="RevitAPIUI"> | ||
<HintPath>..\References\Revit\2023\RevitAPIUI.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Windows.Forms" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="..\Common\GlobalAssemblyInfo.cs"> | ||
<Link>Properties\GlobalAssemblyInfo.cs</Link> | ||
</Compile> | ||
<Compile Include="BatchRvtAddinApplication.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\BatchRvtScriptHost\BatchRvtScriptHost.csproj"> | ||
<Project>{673d1fb5-cfb2-4bdf-9609-c43979dd7197}</Project> | ||
<Name>BatchRvtScriptHost</Name> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Content Include="BatchRvtAddin2023.addin" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<PropertyGroup> | ||
<PostBuildEvent>call "$(ProjectDir)..\AddinDeployment\DeployAddin.bat" "$(ProjectDir)" "$(TargetDir)" "2023"</PostBuildEvent> | ||
</PropertyGroup> | ||
</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,96 @@ | ||
// | ||
// 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.Collections.Generic; | ||
using System.Linq; | ||
using System.ComponentModel; | ||
using System.IO; | ||
using WinForms = System.Windows.Forms; | ||
using Autodesk.Revit.UI; | ||
using Autodesk.Revit.Attributes; | ||
using Autodesk.Revit.ApplicationServices; | ||
|
||
using BatchRvt.ScriptHost; | ||
|
||
namespace BatchRvt.Addin.Revit2023 | ||
{ | ||
[Transaction(TransactionMode.Manual)] | ||
[Regeneration(RegenerationOption.Manual)] | ||
[DisplayName("BatchRvtAddin")] | ||
[Description("BatchRvtAddin")] | ||
public class BatchRvtAddinApplication : IExternalApplication | ||
{ | ||
private static void SetupBatchScriptHost(ControlledApplication controlledApplication) | ||
{ | ||
var pluginFolderPath = Path.GetDirectoryName(typeof(BatchRvtAddinApplication).Assembly.Location); | ||
|
||
var batchRvtExternalEventHandler = new BatchRvtExternalEventHandler(pluginFolderPath); | ||
|
||
batchRvtExternalEventHandler.Raise(); | ||
} | ||
|
||
public Result OnStartup(UIControlledApplication uiApplication) | ||
{ | ||
SetupBatchScriptHost(uiApplication.ControlledApplication); | ||
|
||
return Result.Succeeded; | ||
} | ||
|
||
public Result OnShutdown(UIControlledApplication application) | ||
{ | ||
return Result.Succeeded; | ||
} | ||
} | ||
|
||
public class BatchRvtExternalEventHandler : IExternalEventHandler | ||
{ | ||
private readonly ExternalEvent externalEvent_; | ||
private readonly string pluginFolderPath_; | ||
|
||
public BatchRvtExternalEventHandler(string pluginFolderPath) | ||
{ | ||
this.externalEvent_ = ExternalEvent.Create(this); | ||
this.pluginFolderPath_ = pluginFolderPath; | ||
} | ||
|
||
public void Execute(UIApplication uiApp) | ||
{ | ||
try | ||
{ | ||
ScriptHostUtil.ExecuteBatchScriptHost(this.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 this.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,23 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("BatchRvtAddin2023")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("BVN")] | ||
[assembly: AssemblyProduct("BatchRvtAddin2023")] | ||
[assembly: AssemblyCopyright("Copyright © BVN 2022")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("60c3c457-d35a-4343-a906-01cf666dc75e")] |
Binary file not shown.
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
Oops, something went wrong.