17 Commits

Author SHA1 Message Date
Connor Ivy 5f4e479864 actually works for 2021 2023-03-08 17:56:40 -06:00
Matteo Cominetti 904c541c1b Merge pull request #23 from specklesystems/connor/close-doc
add close doc function
2023-03-08 21:19:39 +00:00
Connor Ivy 1eebeb7f9c add close doc function 2023-03-08 12:15:08 -06:00
Matteo Cominetti ae31d97bf0 Merge pull request #22 from martijn00/warnings
Cleanup warnings
2023-03-08 17:23:38 +00:00
Matteo Cominetti 32640ba49f Merge branch 'master' into warnings 2023-03-08 17:23:29 +00:00
Matteo Cominetti 4975d74185 feat: adds a revit button, minor cleanups 2023-03-08 17:37:28 +01:00
Martijn van Dijk 3142d73ae3 Cleanup warnings 2023-03-08 12:19:18 +01:00
Matteo Cominetti 5b7793b238 Merge pull request #21 from specklesystems/martijn-merge
Martijn merge
2023-03-08 10:13:19 +00:00
Matteo Cominetti ea575ec809 chore: formatting fix 2023-03-08 11:04:37 +01:00
Matteo Cominetti c0c5fd3505 feat: adds editor config, replaces some nugets, adds xru as linked file 2023-03-08 11:03:41 +01:00
Martijn van Dijk 101847462e Delete old nuspec 2023-03-03 11:53:55 +01:00
Martijn van Dijk 04147d56a8 Fix proj files 2023-03-03 11:39:28 +01:00
Martijn van Dijk e10fe3fb61 All the same formatting 2023-03-02 21:52:09 +01:00
Martijn van Dijk c99052c726 Cleanup warnings 2023-03-02 21:52:09 +01:00
Martijn van Dijk 39cfe650ca Cleanup proj files 2023-03-02 21:52:08 +01:00
Martijn van Dijk e91b6686c9 Fix nuget output 2023-03-02 21:51:09 +01:00
Martijn van Dijk f5b3a6cf3c Try generate nuget 2023-03-02 21:51:07 +01:00
37 changed files with 1210 additions and 1593 deletions
+150
View File
@@ -0,0 +1,150 @@
root = true
# EditorConfig is awesome:http://EditorConfig.org
# top-most EditorConfig file
# Don't use tabs for indentation.
[*]
indent_style = space
indent_size = 2
# Code files
[*.{cs, csx, vb, vbx}]
insert_final_newline = true
charset = utf-8-bom
# ReSharper properties
resharper_csharp_extra_spaces = leave_multiple
resharper_csharp_naming_rule.private_constants = AaBb, AA_BB
resharper_csharp_space_within_array_access_brackets = true
resharper_space_around_arrow_op = true
resharper_space_within_array_rank_brackets = true
resharper_use_indent_from_vs = false
resharper_xml_attribute_style = first_attribute_on_single_line
resharper_xml_pi_attribute_style = first_attribute_on_single_line
# Dotnet code style settings:
[*.{cs, vb}]
# Sort using and Import directives with System.* appearing first
dotnet_sort_system_directives_first = true
# Avoid "this." and "Me." if not necessary
dotnet_style_qualification_for_field = false : suggestion
dotnet_style_qualification_for_property = false : suggestion
dotnet_style_qualification_for_method = false : suggestion
dotnet_style_qualification_for_event = false : suggestion
# Use language keywords instead of framework type names for type references
dotnet_style_predefined_type_for_locals_parameters_members = true : suggestion
dotnet_style_predefined_type_for_member_access = true : suggestion
# Suggest more modern language features when available
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
# CSharp code style settings:
[*.cs]
# Prefer "var" everywhere
csharp_style_var_for_built_in_types = true : suggestion
csharp_style_var_when_type_is_apparent = true : suggestion
csharp_style_var_elsewhere = true : suggestion
# Prefer method-like constructs to have a block body
csharp_style_expression_bodied_methods = false:none
csharp_style_expression_bodied_constructors = false:none
csharp_style_expression_bodied_operators = false:none
# Prefer property-like constructs to have an expression-body
csharp_style_expression_bodied_properties = true:none
csharp_style_expression_bodied_indexers = true:none
csharp_style_expression_bodied_accessors = true:none
# Suggest more modern language features when available
csharp_style_pattern_matching_over_is_with_cast_check = true : suggestion
csharp_style_pattern_matching_over_as_with_null_check = true : suggestion
csharp_style_inlined_variable_declaration = true : suggestion
csharp_style_throw_expression = true:suggestion
csharp_style_conditional_delegate_call = true : suggestion
# Newline settings
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
spaces_around_brackets = inside
csharp_using_directive_placement = outside_namespace:silent
csharp_prefer_simple_using_statement = true:suggestion
csharp_prefer_braces = true:silent
csharp_style_namespace_declarations = block_scoped:silent
csharp_style_prefer_method_group_conversion = true:silent
csharp_style_prefer_top_level_statements = true:silent
csharp_style_expression_bodied_lambdas = true:silent
csharp_style_expression_bodied_local_functions = false:silent
csharp_style_prefer_null_check_over_type_check = true:suggestion
csharp_indent_labels = one_less_than_current
[*.{cs,vb}]
#### Naming styles ####
# Naming rules
dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
# Symbol specifications
dotnet_naming_symbols.interface.applicable_kinds = interface
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.interface.required_modifiers =
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.types.required_modifiers =
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.non_field_members.required_modifiers =
# Naming styles
dotnet_naming_style.begins_with_i.required_prefix = I
dotnet_naming_style.begins_with_i.required_suffix =
dotnet_naming_style.begins_with_i.word_separator =
dotnet_naming_style.begins_with_i.capitalization = pascal_case
dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case
dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_auto_properties = true:silent
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
dotnet_style_prefer_conditional_expression_over_return = true:silent
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_compound_assignment = true:suggestion
dotnet_style_prefer_simplified_interpolation = true:suggestion
dotnet_style_namespace_match_folder = true:suggestion
dotnet_style_operator_placement_when_wrapping = beginning_of_line
tab_width = 2
end_of_line = crlf
+96
View File
@@ -0,0 +1,96 @@
<Project>
<PropertyGroup>
<Copyright>Copyright (c) Speckle</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/Speckle-Next/xunit-Revit</PackageProjectUrl>
<Authors>Speckle</Authors>
<Owners>Speckle</Owners>
<PackageTags>xunit revit runner</PackageTags>
<PackageReleaseNotes>https://github.com/Speckle-Next/xunit-Revit/releases</PackageReleaseNotes>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageReadmeFile>readme.md</PackageReadmeFile>
<NeutralLanguage>en-US</NeutralLanguage>
<MinClientVersion>2.14</MinClientVersion>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<RepositoryUrl>https://github.com/Speckle-Next/xunit-Revit</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Product>$(AssemblyName) ($(TargetFramework))</Product>
<Version>1.0.5</Version>
<AssemblyName>xUnitRevitUtils</AssemblyName>
<RootNamespace>xUnitRevitUtils</RootNamespace>
<!--<Nullable>enable</Nullable>-->
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>latest</LangVersion>
<NoWarn>$(NoWarn);1591;1701;1702;1705;VSX1000;CS0109;CS0108;CS0618;CS0114;NU1603</NoWarn>
<Platform>AnyCPU</Platform>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisLevel>latest</AnalysisLevel>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<IsLibraryProject>$(MSBuildProjectName.Contains('Utils'))</IsLibraryProject>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<IsPackable Condition="'$(IsLibraryProject)' == 'true'">true</IsPackable>
<!--<SymbolPackageFormat>snupkg</SymbolPackageFormat>-->
<IncludeSymbols>false</IncludeSymbols>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<DesignTimeBuild>false</DesignTimeBuild>
<DebugType>portable</DebugType>
<DebugSymbols>true</DebugSymbols>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<GeneratePackageOnBuild Condition="'$(IsLibraryProject)' == 'true'">true</GeneratePackageOnBuild>
<PackageOutputPath>$(SolutionDir)\artifacts</PackageOutputPath>
<PackageIcon>icon.png</PackageIcon>
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<ItemGroup Condition="'$(IsLibraryProject)' == 'true'">
<None Include="$(MSBuildThisFileDirectory)\LICENSE" Pack="true" PackagePath="\" />
<None Include="$(MSBuildThisFileDirectory)\icon.png" Pack="true" PackagePath="\" />
<None Include="$(MSBuildThisFileDirectory)\readme.md" Pack="true" PackagePath="\"/>
<Compile Include="$(MSBuildThisFileDirectory)\xUnitRevitUtilsShared\xru.cs" Link="xru.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Roslynator.Analyzers" Version="4.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="AsyncFixer" Version="1.6.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="IDisposableAnalyzers" Version="4.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="PropertyChangedAnalyzers" Version="4.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="ReflectionAnalyzers" Version="0.3.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Meziantou.Analyzer" Version="2.0.19">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
+26
View File
@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using Autodesk.Revit.DB;
using xUnitRevitUtils;
namespace SampleLibrary
{
public sealed class DocFixture : IDisposable
{
public Document Doc { get; set; }
public IList<Element> Walls { get; set; }
public DocFixture()
{
var testModel = Utils.GetTestModel("walls.rvt");
Doc = xru.OpenDoc(testModel);
Walls = new FilteredElementCollector(Doc).WhereElementIsNotElementType().OfCategory(BuiltInCategory.OST_Walls).ToElements();
}
public void Dispose()
{
}
}
}
-1
View File
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
+82 -119
View File
@@ -1,120 +1,83 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\xunit.core.2.4.1\build\xunit.core.props" Condition="Exists('..\packages\xunit.core.2.4.1\build\xunit.core.props')" />
<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>{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SampleLibrary</RootNamespace>
<AssemblyName>SampleLibrary</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug2023|AnyCPU' Or '$(Configuration)|$(Platform)' == 'Debug2022|AnyCPU' Or '$(Configuration)|$(Platform)' == 'Debug2021|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE,post2021</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug2019|AnyCPU' Or '$(Configuration)|$(Platform)' == 'Debug2020|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE,pre2021</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="AdWindows, Version=3.0.4.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ModPlus.Revit.API.2021.1.0.0\lib\AdWindows.dll</HintPath>
</Reference>
<Reference Include="RevitAPI, Version=21.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\ModPlus.Revit.API.2021.1.0.0\lib\RevitAPI.dll</HintPath>
</Reference>
<Reference Include="RevitAPIIFC, Version=21.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion>
<HintPath>.\RevitAPIIFC.dll</HintPath>
</Reference>
<Reference Include="RevitAPIUI, Version=21.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\ModPlus.Revit.API.2021.1.0.0\lib\RevitAPIUI.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="xunit.abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\packages\xunit.abstractions.2.0.3\lib\net35\xunit.abstractions.dll</HintPath>
</Reference>
<Reference Include="xunit.assert, Version=2.4.1.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\packages\xunit.assert.2.4.1\lib\netstandard1.1\xunit.assert.dll</HintPath>
</Reference>
<Reference Include="xunit.core, Version=2.4.1.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\packages\xunit.extensibility.core.2.4.1\lib\net452\xunit.core.dll</HintPath>
</Reference>
<Reference Include="xunit.execution.desktop, Version=2.4.1.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\packages\xunit.extensibility.execution.2.4.1\lib\net452\xunit.execution.desktop.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="SampleTest.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TestWithFixture.cs" />
<Compile Include="Utils.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\packages\xunit.analyzers.0.10.0\analyzers\dotnet\cs\xunit.analyzers.dll" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\xUnitRevitUtils2021\xUnitRevitUtils2021.csproj">
<Project>{977e0b63-5706-4c2b-9c01-3c02d9ebe377}</Project>
<Name>xUnitRevitUtils2021</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\xunit.core.2.4.1\build\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.core.2.4.1\build\xunit.core.props'))" />
<Error Condition="!Exists('..\packages\xunit.core.2.4.1\build\xunit.core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.core.2.4.1\build\xunit.core.targets'))" />
</Target>
<Import Project="..\packages\xunit.core.2.4.1\build\xunit.core.targets" Condition="Exists('..\packages\xunit.core.2.4.1\build\xunit.core.targets')" />
<?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>{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SampleLibrary</RootNamespace>
<AssemblyName>SampleLibrary</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug2023|AnyCPU' Or '$(Configuration)|$(Platform)' == 'Debug2022|AnyCPU' Or '$(Configuration)|$(Platform)' == 'Debug2021|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE,post2021</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug2019|AnyCPU' Or '$(Configuration)|$(Platform)' == 'Debug2020|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE,pre2021</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="RevitAPIIFC">
<HintPath>.\RevitAPIIFC.dll</HintPath>
<Private>False</Private>
<PrivateAssets>all</PrivateAssets>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="DocFixture.cs" />
<Compile Include="SampleTest.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TestWithFixture.cs" />
<Compile Include="Utils.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\xUnitRevitUtils2021\xUnitRevitUtils2021.csproj">
<Project>{977e0b63-5706-4c2b-9c01-3c02d9ebe377}</Project>
<Name>xUnitRevitUtils2021</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
+66 -74
View File
@@ -1,74 +1,66 @@
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.IFC;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Xunit;
using xUnitRevitUtils;
namespace SampleLibrary
{
public class SampleTest
{
/// <summary>
/// Checks whether all walls in the model have a valid volume
/// </summary>
[Fact]
public void WallsHaveVolume()
{
var testModel = Utils.GetTestModel("walls.rvt");
var doc = xru.OpenDoc(testModel);
var walls = new FilteredElementCollector(doc).WhereElementIsNotElementType().OfCategory(BuiltInCategory.OST_Walls).ToElements();
foreach (var wall in walls)
{
var volumeParam = wall.get_Parameter(BuiltInParameter.HOST_VOLUME_COMPUTED);
Assert.NotNull(volumeParam);
Assert.True(volumeParam.AsDouble() > 0);
}
}
[Fact]
public void SampleFail()
{
#if pre2021
var feet = UnitUtils.ConvertToInternalUnits(3000, DisplayUnitType.DUT_MILLIMETERS);
#else
var feet = UnitUtils.ConvertToInternalUnits(3000, UnitTypeId.Feet);
#endif
Assert.Equal(5, feet);
}
[Fact]
public void GetWallGrossAreaAndRollBack()
{
var testModel = Utils.GetTestModel("walls.rvt");
var doc = xru.OpenDoc(testModel);
var walls = new FilteredElementCollector(doc).WhereElementIsNotElementType().OfCategory(BuiltInCategory.OST_Walls).ToElements();
var wall = walls[0] as Wall;
double grossArea = 0;
var inserts = wall.FindInserts(true, true, true, true);
xru.Run(() =>
{
using (Transaction transaction = new Transaction(doc, "Temporary - only to get gross area"))
{
transaction.Start();
foreach (ElementId insertId in inserts) { doc.Delete(insertId); }
doc.Regenerate();
var wallFaceReference = HostObjectUtils.GetSideFaces(wall, ShellLayerType.Exterior);
var face = doc.GetElement(wallFaceReference.First()).GetGeometryObjectFromReference(wallFaceReference.First()) as PlanarFace;
var wallFaceEdges = face.GetEdgesAsCurveLoops();
grossArea = ExporterIFCUtils.ComputeAreaOfCurveLoops(wallFaceEdges);
transaction.RollBack();
}
}, doc).Wait();
Assert.True(grossArea > 0);
}
}
}
using System.Linq;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.IFC;
using Xunit;
using xUnitRevitUtils;
namespace SampleLibrary
{
public class SampleTest
{
/// <summary>
/// Checks whether all walls in the model have a valid volume
/// </summary>
[Fact]
public void WallsHaveVolume()
{
var testModel = Utils.GetTestModel("walls.rvt");
using var doc = xru.OpenDoc(testModel);
var walls = new FilteredElementCollector(doc).WhereElementIsNotElementType().OfCategory(BuiltInCategory.OST_Walls).ToElements();
foreach (var wall in walls)
{
using var volumeParam = wall.get_Parameter(BuiltInParameter.HOST_VOLUME_COMPUTED);
Assert.NotNull(volumeParam);
Assert.True(volumeParam.AsDouble() > 0);
}
}
[Fact]
public void SampleFail()
{
#if pre2021
var feet = UnitUtils.ConvertToInternalUnits(3000, DisplayUnitType.DUT_MILLIMETERS);
#else
var feet = UnitUtils.ConvertToInternalUnits(3000, UnitTypeId.Feet);
#endif
Assert.Equal(5, feet);
}
[Fact]
public void GetWallGrossAreaAndRollBack()
{
var testModel = Utils.GetTestModel("walls.rvt");
using var doc = xru.OpenDoc(testModel);
var walls = new FilteredElementCollector(doc).WhereElementIsNotElementType().OfCategory(BuiltInCategory.OST_Walls).ToElements();
var wall = walls[0] as Wall;
double grossArea = 0;
var inserts = wall.FindInserts(true, true, true, true);
xru.Run(() =>
{
using var transaction = new Transaction(doc, "Temporary - only to get gross area");
transaction.Start();
foreach (ElementId insertId in inserts) { doc.Delete(insertId); }
doc.Regenerate();
var wallFaceReference = HostObjectUtils.GetSideFaces(wall, ShellLayerType.Exterior);
using var face = doc.GetElement(wallFaceReference[0]).GetGeometryObjectFromReference(wallFaceReference[0]) as PlanarFace;
var wallFaceEdges = face.GetEdgesAsCurveLoops();
grossArea = ExporterIFCUtils.ComputeAreaOfCurveLoops(wallFaceEdges);
transaction.RollBack();
}, doc).Wait();
Assert.True(grossArea > 0);
}
}
}
+70 -93
View File
@@ -1,93 +1,70 @@
using Autodesk.Revit.DB;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xunit;
using xUnitRevitUtils;
namespace SampleLibrary
{
public class DocFixture : IDisposable
{
public Document Doc { get; set; }
public IList<Element> Walls { get; set; }
public DocFixture()
{
var testModel = Utils.GetTestModel("walls.rvt");
Doc = xru.OpenDoc(testModel);
Walls = new FilteredElementCollector(Doc).WhereElementIsNotElementType().OfCategory(BuiltInCategory.OST_Walls).ToElements();
}
public void Dispose()
{
}
}
public class TestWithFixture : IClassFixture<DocFixture>
{
DocFixture fixture;
public TestWithFixture(DocFixture fixture)
{
this.fixture = fixture;
}
[Fact]
public void CountWalls()
{
Assert.Equal(4, fixture.Walls.Count);
}
[Fact]
public void WallOffset()
{
var wall = fixture.Doc.GetElement(new ElementId(346573));
var param = wall.get_Parameter(BuiltInParameter.WALL_BASE_OFFSET);
#if pre2021
var baseOffset = UnitUtils.ConvertFromInternalUnits(param.AsDouble(), param.DisplayUnitType);
#else
var baseOffset = UnitUtils.ConvertFromInternalUnits(param.AsDouble(), param.GetUnitTypeId());
#endif
Assert.Equal(2000, baseOffset);
}
[Fact]
public void MoveWallsUp()
{
var walls = fixture.Walls.Where(x => x.Id.IntegerValue != 346573);
xru.RunInTransaction(() =>
{
foreach(var wall in walls)
{
var param = wall.get_Parameter(BuiltInParameter.WALL_BASE_OFFSET);
#if pre2021
var baseOffset = UnitUtils.ConvertToInternalUnits(2000, param.DisplayUnitType);
#else
var baseOffset = UnitUtils.ConvertToInternalUnits(2000, param.GetUnitTypeId());
#endif
param.Set(baseOffset);
}
}, fixture.Doc)
.Wait(); // Important! Wait for action to finish
foreach (var wall in walls)
{
var param = wall.get_Parameter(BuiltInParameter.WALL_BASE_OFFSET);
#if pre2021
var baseOffset = UnitUtils.ConvertFromInternalUnits(param.AsDouble(), param.DisplayUnitType);
#else
var baseOffset = UnitUtils.ConvertFromInternalUnits(param.AsDouble(), param.GetUnitTypeId());
#endif
Assert.Equal(2000, baseOffset);
}
}
}
}
using System.Linq;
using Autodesk.Revit.DB;
using Xunit;
using xUnitRevitUtils;
namespace SampleLibrary
{
public class TestWithFixture : IClassFixture<DocFixture>
{
DocFixture fixture;
public TestWithFixture(DocFixture fixture)
{
this.fixture = fixture;
}
[Fact]
public void CountWalls()
{
Assert.Equal(4, fixture.Walls.Count);
}
[Fact]
public void WallOffset()
{
using var wall = fixture.Doc.GetElement(new ElementId(346573));
using var param = wall.get_Parameter(BuiltInParameter.WALL_BASE_OFFSET);
#if pre2021
var baseOffset = UnitUtils.ConvertFromInternalUnits(param.AsDouble(), param.DisplayUnitType);
#else
var baseOffset = UnitUtils.ConvertFromInternalUnits(param.AsDouble(), param.GetUnitTypeId());
#endif
Assert.Equal(2000, baseOffset);
}
[Fact]
public void MoveWallsUp()
{
var walls = fixture.Walls.Where(x => x.Id.IntegerValue != 346573);
xru.RunInTransaction(() =>
{
foreach (var wall in walls)
{
var param = wall.get_Parameter(BuiltInParameter.WALL_BASE_OFFSET);
#if pre2021
var baseOffset = UnitUtils.ConvertToInternalUnits(2000, param.DisplayUnitType);
#else
var baseOffset = UnitUtils.ConvertToInternalUnits(2000, param.GetUnitTypeId());
#endif
param.Set(baseOffset);
}
}, fixture.Doc)
.Wait(); // Important! Wait for action to finish
foreach (var wall in walls)
{
using var param = wall.get_Parameter(BuiltInParameter.WALL_BASE_OFFSET);
#if pre2021
var baseOffset = UnitUtils.ConvertFromInternalUnits(param.AsDouble(), param.DisplayUnitType);
#else
var baseOffset = UnitUtils.ConvertFromInternalUnits(param.AsDouble(), param.GetUnitTypeId());
#endif
Assert.Equal(2000, baseOffset);
}
}
}
}
+19 -24
View File
@@ -1,24 +1,19 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SampleLibrary
{
public static class Utils
{
/// <summary>
/// Utility method to get models from local folder rather than an absolute path
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
public static string GetTestModel(string filename)
{
var path = Path.Combine(Directory.GetCurrentDirectory(), "..", "..", "TestModels", filename);
return path;
}
}
}
using System.IO;
namespace SampleLibrary
{
public static class Utils
{
/// <summary>
/// Utility method to get models from local folder rather than an absolute path
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
public static string GetTestModel(string filename)
{
var path = Path.Combine(Directory.GetCurrentDirectory(), "..", "..", "TestModels", filename);
return path;
}
}
}
-12
View File
@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ModPlus.Revit.API.2021" version="1.0.0" targetFramework="net472" />
<package id="xunit" version="2.4.1" targetFramework="net472" />
<package id="xunit.abstractions" version="2.0.3" targetFramework="net472" />
<package id="xunit.analyzers" version="0.10.0" targetFramework="net472" />
<package id="xunit.assert" version="2.4.1" targetFramework="net472" />
<package id="xunit.core" version="2.4.1" targetFramework="net472" />
<package id="xunit.extensibility.core" version="2.4.1" targetFramework="net472" />
<package id="xunit.extensibility.execution" version="2.4.1" targetFramework="net472" />
<package id="xUnitRevitUtils.2021" version="1.0.1" targetFramework="net472" />
</packages>
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

+157 -150
View File
@@ -1,150 +1,157 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.2.32630.192
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xUnitRevit", "xUnitRevit\xUnitRevit.csproj", "{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "xUnitRevitUtils2021", "xUnitRevitUtils2021\xUnitRevitUtils2021.csproj", "{977E0B63-5706-4C2B-9C01-3C02D9EBE377}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "xUnitRevitUtils2020", "xUnitRevitUtils2020\xUnitRevitUtils2020.csproj", "{0DEF0F23-8AE2-461B-B014-8A0DA7494088}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "xUnitRevitUtils2019", "xUnitRevitUtils2019\xUnitRevitUtils2019.csproj", "{02399359-9CA0-4B47-B467-541E290E700F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleLibrary", "SampleLibrary\SampleLibrary.csproj", "{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "xUnitRevitUtils2023", "xUnitRevitUtils2023\xUnitRevitUtils2023.csproj", "{E0BF38C2-13BC-4ACC-B0F2-4DFE82965DB4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "xUnitRevitUtils2022", "xUnitRevitUtils2022\xUnitRevitUtils2022.csproj", "{78770414-4F6B-4429-BD8F-F0F64A349551}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug2019|Any CPU = Debug2019|Any CPU
Debug2020|Any CPU = Debug2020|Any CPU
Debug2021|Any CPU = Debug2021|Any CPU
Debug2022|Any CPU = Debug2022|Any CPU
Debug2023|Any CPU = Debug2023|Any CPU
Release|Any CPU = Release|Any CPU
Release2019|Any CPU = Release2019|Any CPU
Release2020|Any CPU = Release2020|Any CPU
Release2021|Any CPU = Release2021|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Debug|Any CPU.ActiveCfg = Debug2021|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Debug|Any CPU.Build.0 = Debug2021|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Debug2019|Any CPU.ActiveCfg = Debug2019|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Debug2019|Any CPU.Build.0 = Debug2019|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Debug2020|Any CPU.ActiveCfg = Debug2020|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Debug2020|Any CPU.Build.0 = Debug2020|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Debug2021|Any CPU.ActiveCfg = Debug2021|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Debug2021|Any CPU.Build.0 = Debug2021|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Debug2022|Any CPU.ActiveCfg = Debug2022|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Debug2022|Any CPU.Build.0 = Debug2022|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Debug2023|Any CPU.ActiveCfg = Debug2023|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Debug2023|Any CPU.Build.0 = Debug2023|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Release|Any CPU.ActiveCfg = Release2021|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Release2019|Any CPU.ActiveCfg = Release2019|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Release2019|Any CPU.Build.0 = Release2019|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Release2020|Any CPU.ActiveCfg = Release2020|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Release2020|Any CPU.Build.0 = Release2020|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Release2021|Any CPU.ActiveCfg = Release2021|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Release2021|Any CPU.Build.0 = Release2021|Any CPU
{977E0B63-5706-4C2B-9C01-3C02D9EBE377}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{977E0B63-5706-4C2B-9C01-3C02D9EBE377}.Debug|Any CPU.Build.0 = Debug|Any CPU
{977E0B63-5706-4C2B-9C01-3C02D9EBE377}.Debug2019|Any CPU.ActiveCfg = Debug|Any CPU
{977E0B63-5706-4C2B-9C01-3C02D9EBE377}.Debug2020|Any CPU.ActiveCfg = Debug|Any CPU
{977E0B63-5706-4C2B-9C01-3C02D9EBE377}.Debug2021|Any CPU.ActiveCfg = Debug|Any CPU
{977E0B63-5706-4C2B-9C01-3C02D9EBE377}.Debug2021|Any CPU.Build.0 = Debug|Any CPU
{977E0B63-5706-4C2B-9C01-3C02D9EBE377}.Debug2022|Any CPU.ActiveCfg = Debug|Any CPU
{977E0B63-5706-4C2B-9C01-3C02D9EBE377}.Debug2023|Any CPU.ActiveCfg = Debug|Any CPU
{977E0B63-5706-4C2B-9C01-3C02D9EBE377}.Release|Any CPU.ActiveCfg = Release|Any CPU
{977E0B63-5706-4C2B-9C01-3C02D9EBE377}.Release|Any CPU.Build.0 = Release|Any CPU
{977E0B63-5706-4C2B-9C01-3C02D9EBE377}.Release2019|Any CPU.ActiveCfg = Release|Any CPU
{977E0B63-5706-4C2B-9C01-3C02D9EBE377}.Release2020|Any CPU.ActiveCfg = Release|Any CPU
{977E0B63-5706-4C2B-9C01-3C02D9EBE377}.Release2021|Any CPU.ActiveCfg = Release|Any CPU
{977E0B63-5706-4C2B-9C01-3C02D9EBE377}.Release2021|Any CPU.Build.0 = Release|Any CPU
{0DEF0F23-8AE2-461B-B014-8A0DA7494088}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0DEF0F23-8AE2-461B-B014-8A0DA7494088}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0DEF0F23-8AE2-461B-B014-8A0DA7494088}.Debug2019|Any CPU.ActiveCfg = Debug|Any CPU
{0DEF0F23-8AE2-461B-B014-8A0DA7494088}.Debug2020|Any CPU.ActiveCfg = Debug|Any CPU
{0DEF0F23-8AE2-461B-B014-8A0DA7494088}.Debug2020|Any CPU.Build.0 = Debug|Any CPU
{0DEF0F23-8AE2-461B-B014-8A0DA7494088}.Debug2021|Any CPU.ActiveCfg = Debug|Any CPU
{0DEF0F23-8AE2-461B-B014-8A0DA7494088}.Debug2022|Any CPU.ActiveCfg = Debug|Any CPU
{0DEF0F23-8AE2-461B-B014-8A0DA7494088}.Debug2023|Any CPU.ActiveCfg = Debug|Any CPU
{0DEF0F23-8AE2-461B-B014-8A0DA7494088}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0DEF0F23-8AE2-461B-B014-8A0DA7494088}.Release|Any CPU.Build.0 = Release|Any CPU
{0DEF0F23-8AE2-461B-B014-8A0DA7494088}.Release2019|Any CPU.ActiveCfg = Release|Any CPU
{0DEF0F23-8AE2-461B-B014-8A0DA7494088}.Release2020|Any CPU.ActiveCfg = Release|Any CPU
{0DEF0F23-8AE2-461B-B014-8A0DA7494088}.Release2020|Any CPU.Build.0 = Release|Any CPU
{0DEF0F23-8AE2-461B-B014-8A0DA7494088}.Release2021|Any CPU.ActiveCfg = Release|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Debug2019|Any CPU.ActiveCfg = Debug|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Debug2019|Any CPU.Build.0 = Debug|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Debug2020|Any CPU.ActiveCfg = Debug|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Debug2021|Any CPU.ActiveCfg = Debug|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Debug2022|Any CPU.ActiveCfg = Debug|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Debug2022|Any CPU.Build.0 = Debug|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Debug2023|Any CPU.ActiveCfg = Debug|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Debug2023|Any CPU.Build.0 = Debug|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Release|Any CPU.Build.0 = Release|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Release2019|Any CPU.ActiveCfg = Release|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Release2019|Any CPU.Build.0 = Release|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Release2020|Any CPU.ActiveCfg = Release|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Release2021|Any CPU.ActiveCfg = Release|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Debug2019|Any CPU.ActiveCfg = Debug|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Debug2019|Any CPU.Build.0 = Debug|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Debug2020|Any CPU.ActiveCfg = Debug|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Debug2020|Any CPU.Build.0 = Debug|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Debug2021|Any CPU.ActiveCfg = Debug|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Debug2021|Any CPU.Build.0 = Debug|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Debug2022|Any CPU.ActiveCfg = Debug|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Debug2022|Any CPU.Build.0 = Debug|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Debug2023|Any CPU.ActiveCfg = Debug|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Debug2023|Any CPU.Build.0 = Debug|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Release|Any CPU.Build.0 = Release|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Release2019|Any CPU.ActiveCfg = Release|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Release2019|Any CPU.Build.0 = Release|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Release2020|Any CPU.ActiveCfg = Release|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Release2020|Any CPU.Build.0 = Release|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Release2021|Any CPU.ActiveCfg = Release|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Release2021|Any CPU.Build.0 = Release|Any CPU
{E0BF38C2-13BC-4ACC-B0F2-4DFE82965DB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E0BF38C2-13BC-4ACC-B0F2-4DFE82965DB4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E0BF38C2-13BC-4ACC-B0F2-4DFE82965DB4}.Debug2019|Any CPU.ActiveCfg = Debug|Any CPU
{E0BF38C2-13BC-4ACC-B0F2-4DFE82965DB4}.Debug2020|Any CPU.ActiveCfg = Debug|Any CPU
{E0BF38C2-13BC-4ACC-B0F2-4DFE82965DB4}.Debug2021|Any CPU.ActiveCfg = Debug|Any CPU
{E0BF38C2-13BC-4ACC-B0F2-4DFE82965DB4}.Debug2022|Any CPU.ActiveCfg = Debug|Any CPU
{E0BF38C2-13BC-4ACC-B0F2-4DFE82965DB4}.Debug2023|Any CPU.ActiveCfg = Debug|Any CPU
{E0BF38C2-13BC-4ACC-B0F2-4DFE82965DB4}.Debug2023|Any CPU.Build.0 = Debug|Any CPU
{E0BF38C2-13BC-4ACC-B0F2-4DFE82965DB4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E0BF38C2-13BC-4ACC-B0F2-4DFE82965DB4}.Release|Any CPU.Build.0 = Release|Any CPU
{E0BF38C2-13BC-4ACC-B0F2-4DFE82965DB4}.Release2019|Any CPU.ActiveCfg = Release|Any CPU
{E0BF38C2-13BC-4ACC-B0F2-4DFE82965DB4}.Release2020|Any CPU.ActiveCfg = Release|Any CPU
{E0BF38C2-13BC-4ACC-B0F2-4DFE82965DB4}.Release2021|Any CPU.ActiveCfg = Release|Any CPU
{78770414-4F6B-4429-BD8F-F0F64A349551}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{78770414-4F6B-4429-BD8F-F0F64A349551}.Debug|Any CPU.Build.0 = Debug|Any CPU
{78770414-4F6B-4429-BD8F-F0F64A349551}.Debug2019|Any CPU.ActiveCfg = Debug|Any CPU
{78770414-4F6B-4429-BD8F-F0F64A349551}.Debug2020|Any CPU.ActiveCfg = Debug|Any CPU
{78770414-4F6B-4429-BD8F-F0F64A349551}.Debug2021|Any CPU.ActiveCfg = Debug|Any CPU
{78770414-4F6B-4429-BD8F-F0F64A349551}.Debug2022|Any CPU.ActiveCfg = Debug|Any CPU
{78770414-4F6B-4429-BD8F-F0F64A349551}.Debug2022|Any CPU.Build.0 = Debug|Any CPU
{78770414-4F6B-4429-BD8F-F0F64A349551}.Debug2023|Any CPU.ActiveCfg = Debug|Any CPU
{78770414-4F6B-4429-BD8F-F0F64A349551}.Release|Any CPU.ActiveCfg = Release|Any CPU
{78770414-4F6B-4429-BD8F-F0F64A349551}.Release|Any CPU.Build.0 = Release|Any CPU
{78770414-4F6B-4429-BD8F-F0F64A349551}.Release2019|Any CPU.ActiveCfg = Release|Any CPU
{78770414-4F6B-4429-BD8F-F0F64A349551}.Release2020|Any CPU.ActiveCfg = Release|Any CPU
{78770414-4F6B-4429-BD8F-F0F64A349551}.Release2021|Any CPU.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1CD726E4-6BBA-4FC3-9C57-0981EF1A9475}
EndGlobalSection
EndGlobal
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.2.32630.192
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xUnitRevit", "xUnitRevit\xUnitRevit.csproj", "{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "xUnitRevitUtils2021", "xUnitRevitUtils2021\xUnitRevitUtils2021.csproj", "{977E0B63-5706-4C2B-9C01-3C02D9EBE377}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "xUnitRevitUtils2020", "xUnitRevitUtils2020\xUnitRevitUtils2020.csproj", "{0DEF0F23-8AE2-461B-B014-8A0DA7494088}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "xUnitRevitUtils2019", "xUnitRevitUtils2019\xUnitRevitUtils2019.csproj", "{02399359-9CA0-4B47-B467-541E290E700F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleLibrary", "SampleLibrary\SampleLibrary.csproj", "{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "xUnitRevitUtils2023", "xUnitRevitUtils2023\xUnitRevitUtils2023.csproj", "{E0BF38C2-13BC-4ACC-B0F2-4DFE82965DB4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "xUnitRevitUtils2022", "xUnitRevitUtils2022\xUnitRevitUtils2022.csproj", "{78770414-4F6B-4429-BD8F-F0F64A349551}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionItems", "SolutionItems", "{F5A2849D-7C58-4894-B9C5-8488E244B7CF}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
Directory.Build.props = Directory.Build.props
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug2019|Any CPU = Debug2019|Any CPU
Debug2020|Any CPU = Debug2020|Any CPU
Debug2021|Any CPU = Debug2021|Any CPU
Debug2022|Any CPU = Debug2022|Any CPU
Debug2023|Any CPU = Debug2023|Any CPU
Release|Any CPU = Release|Any CPU
Release2019|Any CPU = Release2019|Any CPU
Release2020|Any CPU = Release2020|Any CPU
Release2021|Any CPU = Release2021|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Debug|Any CPU.ActiveCfg = Debug2021|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Debug|Any CPU.Build.0 = Debug2021|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Debug2019|Any CPU.ActiveCfg = Debug2019|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Debug2019|Any CPU.Build.0 = Debug2019|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Debug2020|Any CPU.ActiveCfg = Debug2020|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Debug2020|Any CPU.Build.0 = Debug2020|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Debug2021|Any CPU.ActiveCfg = Debug2021|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Debug2021|Any CPU.Build.0 = Debug2021|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Debug2022|Any CPU.ActiveCfg = Debug2022|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Debug2022|Any CPU.Build.0 = Debug2022|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Debug2023|Any CPU.ActiveCfg = Debug2023|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Debug2023|Any CPU.Build.0 = Debug2023|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Release|Any CPU.ActiveCfg = Release2021|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Release|Any CPU.Build.0 = Release2021|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Release2019|Any CPU.ActiveCfg = Release2019|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Release2019|Any CPU.Build.0 = Release2019|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Release2020|Any CPU.ActiveCfg = Release2020|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Release2020|Any CPU.Build.0 = Release2020|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Release2021|Any CPU.ActiveCfg = Release2021|Any CPU
{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}.Release2021|Any CPU.Build.0 = Release2021|Any CPU
{977E0B63-5706-4C2B-9C01-3C02D9EBE377}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{977E0B63-5706-4C2B-9C01-3C02D9EBE377}.Debug|Any CPU.Build.0 = Debug|Any CPU
{977E0B63-5706-4C2B-9C01-3C02D9EBE377}.Debug2019|Any CPU.ActiveCfg = Debug|Any CPU
{977E0B63-5706-4C2B-9C01-3C02D9EBE377}.Debug2020|Any CPU.ActiveCfg = Debug|Any CPU
{977E0B63-5706-4C2B-9C01-3C02D9EBE377}.Debug2021|Any CPU.ActiveCfg = Debug|Any CPU
{977E0B63-5706-4C2B-9C01-3C02D9EBE377}.Debug2021|Any CPU.Build.0 = Debug|Any CPU
{977E0B63-5706-4C2B-9C01-3C02D9EBE377}.Debug2022|Any CPU.ActiveCfg = Debug|Any CPU
{977E0B63-5706-4C2B-9C01-3C02D9EBE377}.Debug2023|Any CPU.ActiveCfg = Debug|Any CPU
{977E0B63-5706-4C2B-9C01-3C02D9EBE377}.Release|Any CPU.ActiveCfg = Release|Any CPU
{977E0B63-5706-4C2B-9C01-3C02D9EBE377}.Release|Any CPU.Build.0 = Release|Any CPU
{977E0B63-5706-4C2B-9C01-3C02D9EBE377}.Release2019|Any CPU.ActiveCfg = Release|Any CPU
{977E0B63-5706-4C2B-9C01-3C02D9EBE377}.Release2020|Any CPU.ActiveCfg = Release|Any CPU
{977E0B63-5706-4C2B-9C01-3C02D9EBE377}.Release2021|Any CPU.ActiveCfg = Release|Any CPU
{977E0B63-5706-4C2B-9C01-3C02D9EBE377}.Release2021|Any CPU.Build.0 = Release|Any CPU
{0DEF0F23-8AE2-461B-B014-8A0DA7494088}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0DEF0F23-8AE2-461B-B014-8A0DA7494088}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0DEF0F23-8AE2-461B-B014-8A0DA7494088}.Debug2019|Any CPU.ActiveCfg = Debug|Any CPU
{0DEF0F23-8AE2-461B-B014-8A0DA7494088}.Debug2020|Any CPU.ActiveCfg = Debug|Any CPU
{0DEF0F23-8AE2-461B-B014-8A0DA7494088}.Debug2020|Any CPU.Build.0 = Debug|Any CPU
{0DEF0F23-8AE2-461B-B014-8A0DA7494088}.Debug2021|Any CPU.ActiveCfg = Debug|Any CPU
{0DEF0F23-8AE2-461B-B014-8A0DA7494088}.Debug2022|Any CPU.ActiveCfg = Debug|Any CPU
{0DEF0F23-8AE2-461B-B014-8A0DA7494088}.Debug2023|Any CPU.ActiveCfg = Debug|Any CPU
{0DEF0F23-8AE2-461B-B014-8A0DA7494088}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0DEF0F23-8AE2-461B-B014-8A0DA7494088}.Release|Any CPU.Build.0 = Release|Any CPU
{0DEF0F23-8AE2-461B-B014-8A0DA7494088}.Release2019|Any CPU.ActiveCfg = Release|Any CPU
{0DEF0F23-8AE2-461B-B014-8A0DA7494088}.Release2020|Any CPU.ActiveCfg = Release|Any CPU
{0DEF0F23-8AE2-461B-B014-8A0DA7494088}.Release2020|Any CPU.Build.0 = Release|Any CPU
{0DEF0F23-8AE2-461B-B014-8A0DA7494088}.Release2021|Any CPU.ActiveCfg = Release|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Debug2019|Any CPU.ActiveCfg = Debug|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Debug2019|Any CPU.Build.0 = Debug|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Debug2020|Any CPU.ActiveCfg = Debug|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Debug2021|Any CPU.ActiveCfg = Debug|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Debug2022|Any CPU.ActiveCfg = Debug|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Debug2022|Any CPU.Build.0 = Debug|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Debug2023|Any CPU.ActiveCfg = Debug|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Debug2023|Any CPU.Build.0 = Debug|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Release|Any CPU.Build.0 = Release|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Release2019|Any CPU.ActiveCfg = Release|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Release2019|Any CPU.Build.0 = Release|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Release2020|Any CPU.ActiveCfg = Release|Any CPU
{02399359-9CA0-4B47-B467-541E290E700F}.Release2021|Any CPU.ActiveCfg = Release|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Debug2019|Any CPU.ActiveCfg = Debug|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Debug2019|Any CPU.Build.0 = Debug|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Debug2020|Any CPU.ActiveCfg = Debug|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Debug2020|Any CPU.Build.0 = Debug|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Debug2021|Any CPU.ActiveCfg = Debug|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Debug2021|Any CPU.Build.0 = Debug|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Debug2022|Any CPU.ActiveCfg = Debug|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Debug2022|Any CPU.Build.0 = Debug|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Debug2023|Any CPU.ActiveCfg = Debug|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Debug2023|Any CPU.Build.0 = Debug|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Release|Any CPU.Build.0 = Release|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Release2019|Any CPU.ActiveCfg = Release|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Release2019|Any CPU.Build.0 = Release|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Release2020|Any CPU.ActiveCfg = Release|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Release2020|Any CPU.Build.0 = Release|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Release2021|Any CPU.ActiveCfg = Release|Any CPU
{C3A8684E-15BB-4B8B-B46C-35ACE3729C35}.Release2021|Any CPU.Build.0 = Release|Any CPU
{E0BF38C2-13BC-4ACC-B0F2-4DFE82965DB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E0BF38C2-13BC-4ACC-B0F2-4DFE82965DB4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E0BF38C2-13BC-4ACC-B0F2-4DFE82965DB4}.Debug2019|Any CPU.ActiveCfg = Debug|Any CPU
{E0BF38C2-13BC-4ACC-B0F2-4DFE82965DB4}.Debug2020|Any CPU.ActiveCfg = Debug|Any CPU
{E0BF38C2-13BC-4ACC-B0F2-4DFE82965DB4}.Debug2021|Any CPU.ActiveCfg = Debug|Any CPU
{E0BF38C2-13BC-4ACC-B0F2-4DFE82965DB4}.Debug2022|Any CPU.ActiveCfg = Debug|Any CPU
{E0BF38C2-13BC-4ACC-B0F2-4DFE82965DB4}.Debug2023|Any CPU.ActiveCfg = Debug|Any CPU
{E0BF38C2-13BC-4ACC-B0F2-4DFE82965DB4}.Debug2023|Any CPU.Build.0 = Debug|Any CPU
{E0BF38C2-13BC-4ACC-B0F2-4DFE82965DB4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E0BF38C2-13BC-4ACC-B0F2-4DFE82965DB4}.Release|Any CPU.Build.0 = Release|Any CPU
{E0BF38C2-13BC-4ACC-B0F2-4DFE82965DB4}.Release2019|Any CPU.ActiveCfg = Release|Any CPU
{E0BF38C2-13BC-4ACC-B0F2-4DFE82965DB4}.Release2020|Any CPU.ActiveCfg = Release|Any CPU
{E0BF38C2-13BC-4ACC-B0F2-4DFE82965DB4}.Release2021|Any CPU.ActiveCfg = Release|Any CPU
{78770414-4F6B-4429-BD8F-F0F64A349551}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{78770414-4F6B-4429-BD8F-F0F64A349551}.Debug|Any CPU.Build.0 = Debug|Any CPU
{78770414-4F6B-4429-BD8F-F0F64A349551}.Debug2019|Any CPU.ActiveCfg = Debug|Any CPU
{78770414-4F6B-4429-BD8F-F0F64A349551}.Debug2020|Any CPU.ActiveCfg = Debug|Any CPU
{78770414-4F6B-4429-BD8F-F0F64A349551}.Debug2021|Any CPU.ActiveCfg = Debug|Any CPU
{78770414-4F6B-4429-BD8F-F0F64A349551}.Debug2022|Any CPU.ActiveCfg = Debug|Any CPU
{78770414-4F6B-4429-BD8F-F0F64A349551}.Debug2022|Any CPU.Build.0 = Debug|Any CPU
{78770414-4F6B-4429-BD8F-F0F64A349551}.Debug2023|Any CPU.ActiveCfg = Debug|Any CPU
{78770414-4F6B-4429-BD8F-F0F64A349551}.Release|Any CPU.ActiveCfg = Release|Any CPU
{78770414-4F6B-4429-BD8F-F0F64A349551}.Release|Any CPU.Build.0 = Release|Any CPU
{78770414-4F6B-4429-BD8F-F0F64A349551}.Release2019|Any CPU.ActiveCfg = Release|Any CPU
{78770414-4F6B-4429-BD8F-F0F64A349551}.Release2020|Any CPU.ActiveCfg = Release|Any CPU
{78770414-4F6B-4429-BD8F-F0F64A349551}.Release2021|Any CPU.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1CD726E4-6BBA-4FC3-9C57-0981EF1A9475}
EndGlobalSection
EndGlobal
+68 -39
View File
@@ -1,39 +1,68 @@
#region Namespaces
using System;
using System.Collections.Generic;
using Autodesk.Revit.ApplicationServices;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
#endregion
namespace xUnitRevit
{
class App : IExternalApplication
{
public Result OnStartup(UIControlledApplication a)
{
a.ControlledApplication.ApplicationInitialized += ControlledApplication_ApplicationInitialized; ;
return Result.Succeeded;
}
private void ControlledApplication_ApplicationInitialized(object sender, Autodesk.Revit.DB.Events.ApplicationInitializedEventArgs e)
{
Application app = sender as Application;
UIApplication uiapp = new UIApplication(app);
Runner.ReadConfig();
if(Runner.Config.autoStart)
Runner.Launch(uiapp);
}
public Result OnShutdown(UIControlledApplication a)
{
return Result.Succeeded;
}
}
}
#region Namespaces
using System.IO;
using System.Reflection;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using Autodesk.Revit.ApplicationServices;
using Autodesk.Revit.UI;
#endregion
namespace xUnitRevit
{
class App : IExternalApplication
{
public Result OnStartup(UIControlledApplication a)
{
a.ControlledApplication.ApplicationInitialized += ControlledApplication_ApplicationInitialized;
string path = typeof(App).Assembly.Location;
RibbonPanel ribbonPanel = a.CreateRibbonPanel("xUnitRevit by Speckle");
var xUnitRevitButton = ribbonPanel.AddItem(new PushButtonData("Test Runner", "Test Runner", typeof(App).Assembly.Location, typeof(Command).FullName)) as PushButton;
if (xUnitRevitButton != null)
{
xUnitRevitButton.Image = LoadPngImgSource("xUnitRevit.Assets.icon16.png", path);
xUnitRevitButton.LargeImage = LoadPngImgSource("xUnitRevit.Assets.icon32.png", path);
xUnitRevitButton.ToolTipImage = LoadPngImgSource("xUnitRevit.Assets.icon32.png", path);
xUnitRevitButton.ToolTip = "xUnit Test runner for Revit";
xUnitRevitButton.AvailabilityClassName = typeof(CmdAvailabilityViews).FullName;
xUnitRevitButton.SetContextualHelp(new ContextualHelp(ContextualHelpType.Url, "https://speckle.systems"));
}
return Result.Succeeded;
}
private void ControlledApplication_ApplicationInitialized(object sender, Autodesk.Revit.DB.Events.ApplicationInitializedEventArgs e)
{
var app = sender as Application;
var uiapp = new UIApplication(app);
Runner.ReadConfig();
if (Runner.Config.AutoStart)
Runner.Launch(uiapp);
}
public Result OnShutdown(UIControlledApplication a)
{
return Result.Succeeded;
}
private ImageSource LoadPngImgSource(string sourceName, string path)
{
try
{
var assembly = Assembly.LoadFrom(Path.Combine(path));
var icon = assembly.GetManifestResourceStream(sourceName);
PngBitmapDecoder m_decoder = new PngBitmapDecoder(icon, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.Default);
ImageSource m_source = m_decoder.Frames[0];
return (m_source);
}
catch { }
return null;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

+22 -22
View File
@@ -1,22 +1,22 @@
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
namespace xUnitRevit
{
internal class CmdAvailabilityViews : IExternalCommandAvailability
{
/// <summary>
/// Command Availability - Views
/// </summary>
/// <param name="applicationData"></param>
/// <param name="selectedCategories"></param>
/// <returns></returns>
public bool IsCommandAvailable(UIApplication applicationData, CategorySet selectedCategories)
{
//Can be run from any view/state
return true;
}
}
}
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
namespace xUnitRevit
{
internal class CmdAvailabilityViews : IExternalCommandAvailability
{
/// <summary>
/// Command Availability - Views
/// </summary>
/// <param name="applicationData"></param>
/// <param name="selectedCategories"></param>
/// <returns></returns>
public bool IsCommandAvailable(UIApplication applicationData, CategorySet selectedCategories)
{
//Can be run from any view/state
return true;
}
}
}
+23 -31
View File
@@ -1,31 +1,23 @@
#region Namespaces
using System;
using System.Collections.Generic;
using System.Threading;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
#endregion
namespace xUnitRevit
{
[Transaction(TransactionMode.Manual)]
public class Command : IExternalCommand
{
static object consoleLock = new object();
static ManualResetEvent finished = new ManualResetEvent(false);
static Result result = Result.Succeeded;
public Result Execute(
ExternalCommandData commandData,
ref string message,
ElementSet elements)
{
UIApplication uiapp = commandData.Application;
Runner.Launch(uiapp);
return Result.Succeeded;
}
}
}
#region Namespaces
using System.Threading;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
#endregion
namespace xUnitRevit
{
[Transaction(TransactionMode.Manual)]
public class Command : IExternalCommand
{
public Result Execute(
ExternalCommandData commandData,
ref string message,
ElementSet elements)
{
var uiapp = commandData.Application;
Runner.Launch(uiapp);
return Result.Succeeded;
}
}
}
+13 -17
View File
@@ -1,17 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace xUnitRevit
{
/// <summary>
/// Simple configuration file for lazy developers
/// </summary>
public class Configuration
{
public List<string> startupAssemblies { get; set; } = new List<string>();
public bool autoStart { get; set; } = false;
}
}
using System.Collections.Generic;
namespace xUnitRevit
{
/// <summary>
/// Simple configuration file for lazy developers
/// </summary>
public class Configuration
{
public IList<string> StartupAssemblies { get; set; } = new List<string>();
public bool AutoStart { get; set; } = false;
}
}
+43 -46
View File
@@ -1,46 +1,43 @@
using Autodesk.Revit.UI;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace xUnitRevit
{
/// <summary>
/// Event invoker. Has a queue of actions that, in theory, this thing should iterate through.
/// Required to run transactions form a non modal window.
/// </summary>
public class ExternalEventHandler : IExternalEventHandler
{
public bool Running = false;
public List<Action> Queue { get; set; }
public ExternalEventHandler(List<Action> queue)
{
Queue = queue;
}
public void Execute(UIApplication app)
{
Debug.WriteLine("Current queue len is: " + Queue.Count);
if (Running) return; // queue will run itself through
Running = true;
Queue[0]();
Queue.RemoveAt(0);
Running = false;
}
public string GetName()
{
return "xUnit Revit";
}
}
}
using System;
using System.Collections.Generic;
using System.Diagnostics;
using Autodesk.Revit.UI;
namespace xUnitRevit
{
/// <summary>
/// Event invoker. Has a queue of actions that, in theory, this thing should iterate through.
/// Required to run transactions form a non modal window.
/// </summary>
public class ExternalEventHandler : IExternalEventHandler
{
public bool Running = false;
public IList<Action> Queue { get; set; }
public ExternalEventHandler(IList<Action> queue)
{
Queue = queue;
}
public void Execute(UIApplication app)
{
Debug.WriteLine("Current queue len is: " + Queue.Count);
if (Running) return; // queue will run itself through
Running = true;
Queue[0]();
Queue.RemoveAt(0);
Running = false;
}
public string GetName()
{
return "xUnit Revit";
}
}
}
-1
View File
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
+60 -63
View File
@@ -1,63 +1,60 @@
using Autodesk.Revit.UI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Xunit.Runner.Wpf;
using Xunit.Runner.Wpf.ViewModel;
using xUnitRevitUtils;
using System.Web.Script.Serialization;
using System.IO;
namespace xUnitRevit
{
/// <summary>
/// Responsible for launching the xUnit WPF interface and initializing xru with Revit data
/// </summary>
public static class Runner
{
internal static Configuration Config = new Configuration();
internal static void Launch(UIApplication uiapp)
{
try
{
var queue = new List<Action>();
var eventHandler = ExternalEvent.Create(new ExternalEventHandler(queue));
xru.Initialize(uiapp, SynchronizationContext.Current, eventHandler, queue);
var main = new MainWindow();
main.Title = "xUnit Revit by Speckle";
main.MaxHeight = 800;
//pre-load asssemblies, if you're a lazy developer
(main.DataContext as MainViewModel).StartupAssemblies = Config.startupAssemblies;
main.Show();
}
catch (Exception e)
{
//fail silently
}
}
internal static void ReadConfig()
{
try
{
var dir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
var path = Path.Combine(dir, "config.json");
JavaScriptSerializer JavaScriptSerializer = new JavaScriptSerializer();
var json = File.ReadAllText(path);
Config = JavaScriptSerializer.Deserialize<Configuration>(json);
}
catch
{}
}
}
}
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading;
using System.Web.Script.Serialization;
using Autodesk.Revit.UI;
using Xunit.Runner.Wpf;
using Xunit.Runner.Wpf.ViewModel;
using xUnitRevitUtils;
namespace xUnitRevit
{
/// <summary>
/// Responsible for launching the xUnit WPF interface and initializing xru with Revit data
/// </summary>
public static class Runner
{
internal static Configuration Config = new Configuration();
internal static void Launch(UIApplication uiapp)
{
try
{
var queue = new List<Action>();
using var eventHandler = ExternalEvent.Create(new ExternalEventHandler(queue));
xru.Initialize(uiapp, SynchronizationContext.Current, eventHandler, queue);
var main = new MainWindow
{
Title = "xUnit Revit by Speckle",
MaxHeight = 800
};
//pre-load asssemblies, if you're a lazy developer
if (main.DataContext is MainViewModel mainViewModel)
mainViewModel.StartupAssemblies = Config.StartupAssemblies.ToList();
main.Show();
}
catch
{
//fail silently
}
}
internal static void ReadConfig()
{
try
{
var dir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
var path = Path.Combine(dir, "config.json");
var JavaScriptSerializer = new JavaScriptSerializer();
var json = File.ReadAllText(path);
Config = JavaScriptSerializer.Deserialize<Configuration>(json);
}
catch { }
}
}
}
-23
View File
@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
+3 -3
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<RevitAddIns>
<AddIn Type="Command">
<!--<AddIn Type="Command">
<Text>xUnitRevit</Text>
<Description>xUnitRevit</Description>
<Assembly>xUnitRevit\xUnitRevit.dll</Assembly>
@@ -8,9 +8,9 @@
<ClientId>9d179887-9fae-41f9-940a-697b59cafe4a</ClientId>
<VendorId>speckle</VendorId>
<VendorDescription>Speckle</VendorDescription>
</AddIn>
</AddIn>-->
<AddIn Type="Application">
<Name>Application xUnitRevit</Name>
<Name>xUnitRevit Runner</Name>
<Assembly>xUnitRevit\xUnitRevit.dll</Assembly>
<FullClassName>xUnitRevit.App</FullClassName>
<ClientId>d9c9ed6f-7b2a-4c47-8f87-a6f33a553d50</ClientId>
+258 -262
View File
@@ -1,263 +1,259 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
None
</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>xUnitRevit</RootNamespace>
<AssemblyName>xUnitRevit</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<!-- MULTI VERSION CONFIGURATION START -->
<!--2021-->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug2021|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<StartAction>Program</StartAction>
<StartProgram>$(ProgramW6432)\Autodesk\Revit 2021\Revit.exe</StartProgram>
<RevitVersion>2021</RevitVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release2021|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<StartAction>Program</StartAction>
<StartProgram>$(ProgramW6432)\Autodesk\Revit 2021\Revit.exe</StartProgram>
<RevitVersion>2021</RevitVersion>
</PropertyGroup>
<!--2020-->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug2020|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<StartAction>Program</StartAction>
<StartProgram>$(ProgramW6432)\Autodesk\Revit 2020\Revit.exe</StartProgram>
<RevitVersion>2020</RevitVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release2020|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<StartAction>Program</StartAction>
<StartProgram>$(ProgramW6432)\Autodesk\Revit 2020\Revit.exe</StartProgram>
<RevitVersion>2020</RevitVersion>
</PropertyGroup>
<!--2019-->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug2019|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<StartAction>Program</StartAction>
<StartProgram>$(ProgramW6432)\Autodesk\Revit 2019\Revit.exe</StartProgram>
<RevitVersion>2019</RevitVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release2019|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<StartAction>Program</StartAction>
<StartProgram>$(ProgramW6432)\Autodesk\Revit 2019\Revit.exe</StartProgram>
<RevitVersion>2019</RevitVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug2022|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<StartAction>Program</StartAction>
<StartProgram>$(ProgramW6432)\Autodesk\Revit 2022\Revit.exe</StartProgram>
<RevitVersion>2022</RevitVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug2023|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<StartAction>Program</StartAction>
<StartProgram>$(ProgramW6432)\Autodesk\Revit 2023\Revit.exe</StartProgram>
<RevitVersion>2023</RevitVersion>
</PropertyGroup>
<!--END-->
<ItemGroup>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System" />
<Reference Include="System.Numerics" />
<Reference Include="System.Web.Extensions" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="App.cs" />
<Compile Include="CmdAvailabilityViews.cs" />
<Compile Include="Command.cs" />
<Compile Include="Configuration.cs" />
<Compile Include="ExternalEventHandler.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Runner.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="config.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="config_sample.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<!--
<None Include="config.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
-->
<None Include="xUnitRevit.addin" />
</ItemGroup>
<!-- SWITCH REVIT NUGETS -->
<Choose>
<When Condition="'$(Configuration)' == 'Debug2019' Or '$(Configuration)' == 'Release2019'">
<ItemGroup>
<PackageReference Include="ModPlus.Revit.API.2019">
<Version>1.0.0</Version>
<ExcludeAssets>runtime</ExcludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\xUnitRevitUtils2019\xUnitRevitUtils2019.csproj">
<Project>{02399359-9CA0-4B47-B467-541E290E700F}</Project>
<Name>xUnitRevitUtils2019</Name>
</ProjectReference>
</ItemGroup>
</When>
<When Condition="'$(Configuration)' == 'Debug2020' Or '$(Configuration)' == 'Release2020'">
<ItemGroup>
<PackageReference Include="ModPlus.Revit.API.2020">
<Version>1.0.0</Version>
<ExcludeAssets>runtime</ExcludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\xUnitRevitUtils2020\xUnitRevitUtils2020.csproj">
<Project>{0DEF0F23-8AE2-461B-B014-8A0DA7494088}</Project>
<Name>xUnitRevitUtils2020</Name>
</ProjectReference>
</ItemGroup>
</When>
<When Condition="'$(Configuration)' == 'Debug2021' Or '$(Configuration)' == 'Release2021'">
<ItemGroup>
<PackageReference Include="ModPlus.Revit.API.2021">
<Version>1.0.0</Version>
<ExcludeAssets>runtime</ExcludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\xUnitRevitUtils2021\xUnitRevitUtils2021.csproj">
<Project>{977e0b63-5706-4c2b-9c01-3c02d9ebe377}</Project>
<Name>xUnitRevitUtils2021</Name>
</ProjectReference>
</ItemGroup>
</When>
<When Condition="'$(Configuration)' == 'Debug2022' Or '$(Configuration)' == 'Release2022'">
<ItemGroup>
<PackageReference Include="ModPlus.Revit.API.2022">
<Version>1.0.0</Version>
<ExcludeAssets>runtime</ExcludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\xUnitRevitUtils2022\xUnitRevitUtils2022.csproj">
<Project>{78770414-4F6B-4429-BD8F-F0F64A349551}</Project>
<Name>xUnitRevitUtils2022</Name>
</ProjectReference>
</ItemGroup>
</When>
<When Condition="'$(Configuration)' == 'Debug2023' Or '$(Configuration)' == 'Release2023'">
<ItemGroup>
<PackageReference Include="ModPlus.Revit.API.2023">
<Version>1.0.0</Version>
<ExcludeAssets>runtime</ExcludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\xUnitRevitUtils2023\xUnitRevitUtils2023.csproj">
<Project>{E0BF38C2-13BC-4ACC-B0F2-4DFE82965DB4}</Project>
<Name>xUnitRevitUtils2023</Name>
</ProjectReference>
</ItemGroup>
</When>
</Choose>
<!--END-->
<ItemGroup>
<PackageReference Include="MvvmLight">
<Version>5.4.1.1</Version>
</PackageReference>
<PackageReference Include="speckle.xunit.runner.wpf">
<Version>1.0.9</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
<!-- MULTIVERSION POST BUILD EVENTS START -->
<Target Name="AfterBuild">
<CallTarget Condition="'$(Configuration)' == 'Debug2021' Or '$(Configuration)' == 'Debug2020' Or '$(Configuration)' == 'Debug2019'" Targets="AfterBuildDebug" />
<CallTarget Condition="'$(Configuration)' == 'Release2021' Or '$(Configuration)' == 'Release2020' Or '$(Configuration)' == 'Release2019'" Targets="AfterBuildRelease" />
</Target>
<Target Name="AfterBuildDebug">
<ItemGroup>
<SourceDLLs Include="$(TargetDir)\**\*.*" />
<SourceManifest Include="$(ProjectDir)*.addin" />
</ItemGroup>
<Copy DestinationFolder="$(AppData)\Autodesk\REVIT\Addins\$(RevitVersion)\$(ProjectName)\%(RecursiveDir)" SourceFiles="@(SourceDLLs)" />
<Copy DestinationFolder="$(AppData)\Autodesk\REVIT\Addins\$(RevitVersion)\" SourceFiles="@(SourceManifest)" />
</Target>
<Target Name="AfterBuildRelease">
<ItemGroup>
<SourceDLLs Include="$(TargetDir)\**\*.*" />
<SourceManifest Include="$(ProjectDir)*.addin" />
</ItemGroup>
<Message Importance="High" Text="RELEASE copy from $(TargetDir) to $(SolutionDir)\Release\Release$(RevitVersion)\$(ProjectName)\" />
<Copy DestinationFolder="$(SolutionDir)\Release\Release$(RevitVersion)\$(ProjectName)\%(RecursiveDir)" SourceFiles="@(SourceDLLs)" />
<Copy DestinationFolder="$(SolutionDir)\Release\Release$(RevitVersion)\" SourceFiles="@(SourceManifest)" />
</Target>
<!--END-->
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
None
</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{27A79ACA-7EA8-4406-8BB8-216578CC3AB7}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>xUnitRevit</RootNamespace>
<AssemblyName>xUnitRevit</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<!-- MULTI VERSION CONFIGURATION START -->
<!--2021-->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug2021|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<StartAction>Program</StartAction>
<StartProgram>$(ProgramW6432)\Autodesk\Revit 2021\Revit.exe</StartProgram>
<RevitVersion>2021</RevitVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release2021|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<StartAction>Program</StartAction>
<StartProgram>$(ProgramW6432)\Autodesk\Revit 2021\Revit.exe</StartProgram>
<RevitVersion>2021</RevitVersion>
</PropertyGroup>
<!--2020-->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug2020|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<StartAction>Program</StartAction>
<StartProgram>$(ProgramW6432)\Autodesk\Revit 2020\Revit.exe</StartProgram>
<RevitVersion>2020</RevitVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release2020|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<StartAction>Program</StartAction>
<StartProgram>$(ProgramW6432)\Autodesk\Revit 2020\Revit.exe</StartProgram>
<RevitVersion>2020</RevitVersion>
</PropertyGroup>
<!--2019-->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug2019|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<StartAction>Program</StartAction>
<StartProgram>$(ProgramW6432)\Autodesk\Revit 2019\Revit.exe</StartProgram>
<RevitVersion>2019</RevitVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release2019|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<StartAction>Program</StartAction>
<StartProgram>$(ProgramW6432)\Autodesk\Revit 2019\Revit.exe</StartProgram>
<RevitVersion>2019</RevitVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug2022|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<StartAction>Program</StartAction>
<StartProgram>$(ProgramW6432)\Autodesk\Revit 2022\Revit.exe</StartProgram>
<RevitVersion>2022</RevitVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug2023|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<StartAction>Program</StartAction>
<StartProgram>$(ProgramW6432)\Autodesk\Revit 2023\Revit.exe</StartProgram>
<RevitVersion>2023</RevitVersion>
</PropertyGroup>
<!--END-->
<ItemGroup>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System" />
<Reference Include="System.Numerics" />
<Reference Include="System.Web.Extensions" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="App.cs" />
<Compile Include="CmdAvailabilityViews.cs" />
<Compile Include="Command.cs" />
<Compile Include="Configuration.cs" />
<Compile Include="ExternalEventHandler.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Runner.cs" />
</ItemGroup>
<ItemGroup>
<None Include="config_sample.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<!--
<None Include="config.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
-->
<None Include="xUnitRevit.addin" />
</ItemGroup>
<!-- SWITCH REVIT NUGETS -->
<Choose>
<When Condition="$(Configuration.Contains('2019'))">
<ItemGroup>
<PackageReference Include="ModPlus.Revit.API.2019">
<Version>1.0.0</Version>
<ExcludeAssets>runtime</ExcludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\xUnitRevitUtils2019\xUnitRevitUtils2019.csproj">
<Project>{02399359-9CA0-4B47-B467-541E290E700F}</Project>
<Name>xUnitRevitUtils2019</Name>
</ProjectReference>
</ItemGroup>
</When>
<When Condition="$(Configuration.Contains('2020'))">
<ItemGroup>
<PackageReference Include="ModPlus.Revit.API.2020">
<Version>1.0.0</Version>
<ExcludeAssets>runtime</ExcludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\xUnitRevitUtils2020\xUnitRevitUtils2020.csproj">
<Project>{0DEF0F23-8AE2-461B-B014-8A0DA7494088}</Project>
<Name>xUnitRevitUtils2020</Name>
</ProjectReference>
</ItemGroup>
</When>
<When Condition="$(Configuration.Contains('2021'))">
<ItemGroup>
<PackageReference Include="ModPlus.Revit.API.2021">
<Version>4.0.0</Version>
<ExcludeAssets>runtime</ExcludeAssets>
<IncludeAssets>compile; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</When>
<When Condition="$(Configuration.Contains('2022'))">
<ItemGroup>
<PackageReference Include="Speckle.Revit.API">
<Version>2022.0.2.1</Version>
<ExcludeAssets>runtime</ExcludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\xUnitRevitUtils2022\xUnitRevitUtils2022.csproj">
<Project>{78770414-4F6B-4429-BD8F-F0F64A349551}</Project>
<Name>xUnitRevitUtils2022</Name>
</ProjectReference>
</ItemGroup>
</When>
<When Condition="$(Configuration.Contains('2023'))">
<ItemGroup>
<PackageReference Include="Speckle.Revit.API">
<Version>2023.0.0</Version>
<ExcludeAssets>runtime</ExcludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\xUnitRevitUtils2023\xUnitRevitUtils2023.csproj">
<Project>{E0BF38C2-13BC-4ACC-B0F2-4DFE82965DB4}</Project>
<Name>xUnitRevitUtils2023</Name>
</ProjectReference>
</ItemGroup>
</When>
</Choose>
<!--END-->
<ItemGroup>
<PackageReference Include="speckle.xunit.runner.wpf">
<Version>1.0.9</Version>
</PackageReference>
<PackageReference Include="xUnitRevitUtils.2021">
<Version>1.0.4</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Content Include="Assets\icon.png" />
<EmbeddedResource Include="Assets\icon16.png" />
<EmbeddedResource Include="Assets\icon32.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
<!-- MULTIVERSION POST BUILD EVENTS START -->
<Target Name="AfterBuild">
<CallTarget Condition="$(Configuration.Contains('Debug'))" Targets="AfterBuildDebug" />
<CallTarget Condition="$(Configuration.Contains('Release'))" Targets="AfterBuildRelease" />
</Target>
<Target Name="AfterBuildDebug">
<ItemGroup>
<SourceDLLs Include="$(TargetDir)\**\*.*" />
<SourceManifest Include="$(ProjectDir)*.addin" />
</ItemGroup>
<Copy DestinationFolder="$(AppData)\Autodesk\REVIT\Addins\$(RevitVersion)\$(ProjectName)\%(RecursiveDir)" SourceFiles="@(SourceDLLs)" />
<Copy DestinationFolder="$(AppData)\Autodesk\REVIT\Addins\$(RevitVersion)\" SourceFiles="@(SourceManifest)" />
</Target>
<Target Name="AfterBuildRelease">
<ItemGroup>
<SourceDLLs Include="$(TargetDir)\**\*.*" />
<SourceManifest Include="$(ProjectDir)*.addin" />
</ItemGroup>
<Message Importance="High" Text="RELEASE copy from $(TargetDir) to $(SolutionDir)\Release\Release$(RevitVersion)\$(ProjectName)\" />
<Copy DestinationFolder="$(SolutionDir)\Release\Release$(RevitVersion)\$(ProjectName)\%(RecursiveDir)" SourceFiles="@(SourceDLLs)" />
<Copy DestinationFolder="$(SolutionDir)\Release\Release$(RevitVersion)\" SourceFiles="@(SourceManifest)" />
</Target>
<!--END-->
</Project>
+2 -19
View File
@@ -2,30 +2,13 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageProjectUrl>https://github.com/Speckle-Next/xunit-Revit</PackageProjectUrl>
<RepositoryUrl>https://github.com/Speckle-Next/xunit-Revit</RepositoryUrl>
<PackageTags>xunit revit runner</PackageTags>
<Authors>Speckle</Authors>
<Company>Speckle</Company>
<Description>xUnit runner utilities for Revit 2019</Description>
<PackageIconUrl>https://avatars2.githubusercontent.com/u/2092016</PackageIconUrl>
<PackageIcon>xunit.png</PackageIcon>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<AssemblyName>xUnitRevitUtils</AssemblyName>
<RootNamespace>xUnitRevitUtils</RootNamespace>
<PackageId>xUnitRevitUtils.2019</PackageId>
<Version>1.0.5</Version>
<AssemblyVersion>1.0.5.0</AssemblyVersion>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\xUnitRevitUtils2021\xru.cs" Link="xru.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ModPlus.Revit.API.2019" Version="1.0.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="ModPlus.Revit.API.2019" Version="4.0.0" />
<PackageReference Include="xunit" Version="2.4.2" />
</ItemGroup>
</Project>
@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<package >
<metadata>
<id>xUnitRevitUtils.2019</id>
<version>$version$</version>
<title>$title$</title>
<authors>$author$</authors>
<owners>$author$</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="expression">MIT</license>
<projectUrl>https://github.com/Speckle-Next/xunit-Revit</projectUrl>
<iconUrl>https://avatars2.githubusercontent.com/u/2092016</iconUrl>
<description>$description$</description>
<releaseNotes></releaseNotes>
<copyright>Copyright 2020</copyright>
<tags>xunit revit</tags>
<dependencies>
<dependency id="ModPlus.Revit.API.2019" version="1.0.0" />
<dependency id="xunit" version="2.4.1" />
</dependencies>
</metadata>
</package>
+2 -18
View File
@@ -2,30 +2,14 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageProjectUrl>https://github.com/Speckle-Next/xunit-Revit</PackageProjectUrl>
<RepositoryUrl>https://github.com/Speckle-Next/xunit-Revit</RepositoryUrl>
<PackageTags>xunit revit runner</PackageTags>
<Authors>Speckle</Authors>
<Company>Speckle</Company>
<Description>xUnit runner utilities for Revit 2020</Description>
<PackageIconUrl>https://avatars2.githubusercontent.com/u/2092016</PackageIconUrl>
<PackageIcon>xunit.png</PackageIcon>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<AssemblyName>xUnitRevitUtils</AssemblyName>
<RootNamespace>xUnitRevitUtils</RootNamespace>
<PackageId>xUnitRevitUtils.2020</PackageId>
<Version>1.0.5</Version>
<AssemblyVersion>1.0.5.0</AssemblyVersion>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\xUnitRevitUtils2021\xru.cs" Link="xru.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ModPlus.Revit.API.2020" Version="1.0.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="ModPlus.Revit.API.2020" Version="4.0.0" />
<PackageReference Include="xunit" Version="2.4.2" />
</ItemGroup>
</Project>
@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<package >
<metadata>
<id>xUnitRevitUtils.2020</id>
<version>$version$</version>
<title>$title$</title>
<authors>$author$</authors>
<owners>$author$</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="expression">MIT</license>
<projectUrl>https://github.com/Speckle-Next/xunit-Revit</projectUrl>
<iconUrl>https://avatars2.githubusercontent.com/u/2092016</iconUrl>
<description>$description$</description>
<releaseNotes></releaseNotes>
<copyright>Copyright 2020</copyright>
<tags>xunit revit</tags>
<dependencies>
<dependency id="ModPlus.Revit.API.2020" version="1.0.0" />
<dependency id="xunit" version="2.4.1" />
</dependencies>
</metadata>
</package>
+2 -14
View File
@@ -2,25 +2,13 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageProjectUrl>https://github.com/Speckle-Next/xunit-Revit</PackageProjectUrl>
<RepositoryUrl>https://github.com/Speckle-Next/xunit-Revit</RepositoryUrl>
<PackageTags>xunit revit runner</PackageTags>
<Authors>Speckle</Authors>
<Company>Speckle</Company>
<Description>xUnit runner utilities for Revit 2021</Description>
<PackageIconUrl>https://avatars2.githubusercontent.com/u/2092016</PackageIconUrl>
<PackageIcon>xunit.png</PackageIcon>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<AssemblyName>xUnitRevitUtils</AssemblyName>
<RootNamespace>xUnitRevitUtils</RootNamespace>
<PackageId>xUnitRevitUtils.2021</PackageId>
<Version>1.0.5</Version>
<AssemblyVersion>1.0.5.0</AssemblyVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ModPlus.Revit.API.2021" Version="1.0.0" />
<PackageReference Include="ModPlus.Revit.API.2021" Version="4.0.0" />
<PackageReference Include="xunit" Version="2.4.1" />
</ItemGroup>
@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<package >
<metadata>
<id>xUnitRevitUtils.2021</id>
<version>$version$</version>
<title>$title$</title>
<authors>$author$</authors>
<owners>$author$</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="expression">MIT</license>
<projectUrl>https://github.com/Speckle-Next/xunit-Revit</projectUrl>
<iconUrl>https://avatars2.githubusercontent.com/u/2092016</iconUrl>
<description>$description$</description>
<releaseNotes></releaseNotes>
<copyright>Copyright 2020</copyright>
<tags>xunit revit</tags>
<dependencies>
<dependency id="ModPlus.Revit.API.2021" version="1.0.0" />
<dependency id="xunit" version="2.4.1" />
</dependencies>
</metadata>
</package>
+4 -16
View File
@@ -2,26 +2,14 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageProjectUrl>https://github.com/Speckle-Next/xunit-Revit</PackageProjectUrl>
<RepositoryUrl>https://github.com/Speckle-Next/xunit-Revit</RepositoryUrl>
<PackageTags>xunit revit runner</PackageTags>
<Authors>Speckle</Authors>
<Company>Speckle</Company>
<Description>xUnit runner utilities for Revit 2022</Description>
<PackageIconUrl>https://avatars2.githubusercontent.com/u/2092016</PackageIconUrl>
<PackageIcon>xunit.png</PackageIcon>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<AssemblyName>xUnitRevitUtils</AssemblyName>
<RootNamespace>xUnitRevitUtils</RootNamespace>
<PackageId>xUnitRevitUtils.2021</PackageId>
<Version>1.0.5</Version>
<AssemblyVersion>1.0.5.0</AssemblyVersion>
<PackageId>xUnitRevitUtils.2022</PackageId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ModPlus.Revit.API.2022" Version="1.0.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="Speckle.Revit.API" Version="2022.0.2.1" />
<PackageReference Include="xunit" Version="2.4.2" />
</ItemGroup>
</Project>
@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<package >
<metadata>
<id>xUnitRevitUtils.2023</id>
<version>$version$</version>
<title>$title$</title>
<authors>$author$</authors>
<owners>$author$</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="expression">MIT</license>
<projectUrl>https://github.com/Speckle-Next/xunit-Revit</projectUrl>
<iconUrl>https://avatars2.githubusercontent.com/u/2092016</iconUrl>
<description>$description$</description>
<releaseNotes></releaseNotes>
<copyright>Copyright 2022</copyright>
<tags>xunit revit</tags>
<dependencies>
<dependency id="ModPlus.Revit.API.2023" version="1.0.0" />
<dependency id="xunit" version="2.4.1" />
</dependencies>
</metadata>
</package>
-191
View File
@@ -1,191 +0,0 @@
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using Autodesk.Revit.UI.Selection;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Xunit;
namespace xUnitRevitUtils
{
/// <summary>
/// Utility class with methods and properties used by the xUnit Revit plugin
/// </summary>
public static class xru
{
public static UIApplication Uiapp { get; set; }
private static List<Action> Queue { get; set; }
private static ExternalEvent EventHandler { get; set; }
public static SynchronizationContext UiContext { get; set; }
public static void Initialize(UIApplication uiapp, SynchronizationContext uiContext, ExternalEvent eventHandler, List<Action> queue)
{
Uiapp = uiapp;
UiContext = uiContext;
EventHandler = eventHandler;
Queue = queue;
}
#region utility methods
/// <summary>
/// Returns the selected elements in the active document
/// </summary>
/// <returns></returns>
public static List<Element> GetActiveSelection()
{
Assert.NotNull(Uiapp);
if (Uiapp.ActiveUIDocument != null)
return Uiapp.ActiveUIDocument.Selection.GetElementIds().Select(x => Uiapp.ActiveUIDocument.Document.GetElement(x)).ToList();
return new List<Element>();
}
/// <summary>
/// Opens and activates a document if not open already
/// </summary>
/// <param name="filePath">Path to the file to open</param>
public static Document OpenDoc(string filePath)
{
Assert.NotNull(Uiapp);
Document doc = null;
//OpenAndActivateDocument only works if run from the current context
UiContext.Send(x => { doc = Uiapp.OpenAndActivateDocument(filePath).Document; }, null);
Assert.NotNull(doc);
return doc;
}
/// <summary>
/// Creates a new empty document
/// </summary>
/// <param name="templatePath">Path to the project template</param>
/// <param name="filePath">Path where to save the new doc</param>
/// <param name="overwrite">If true overwrites existing files with same name</param>
/// <returns></returns>
public static Document CreateNewDoc(string templatePath, string filePath, bool overwrite = true)
{
Assert.NotNull(Uiapp);
Document doc = null;
try
{
if (overwrite && File.Exists(filePath))
File.Delete(filePath);
}
catch { }
//OpenAndActivateDocument only works if run from the current context
UiContext.Send(x =>
{
//if already open, just use it
if (!File.Exists(filePath))
{
doc = Uiapp.Application.NewProjectDocument(templatePath);
doc.SaveAs(filePath);
doc.Close();
}
doc = Uiapp.OpenAndActivateDocument(filePath).Document;
}
, null);
Assert.NotNull(doc);
return doc;
}
/// <summary>
/// Runs an Action in a Revit transaction, uses TaskCompletionSource to communicate when done
/// </summary>
/// <param name="action">Action to run</param>
/// <param name="doc">Revit Document</param>
/// <param name="transactionName">Transaction Name</param>
/// <param name="ignoreWarnings">Enable to swallow all warnings generated by the transaction and prevent them from being raised within Revit</param>
/// <returns></returns>
public static Task RunInTransaction(Action action, Document doc, string transactionName = "transaction", bool ignoreWarnings = false)
{
var tcs = new TaskCompletionSource<string>();
Queue.Add(new Action(() =>
{
try
{
using (Transaction transaction = new Transaction(doc, transactionName))
{
transaction.Start();
if (ignoreWarnings)
{
var options = transaction.GetFailureHandlingOptions();
options.SetFailuresPreprocessor(new IgnoreAllWarnings());
transaction.SetFailureHandlingOptions(options);
}
action.Invoke();
transaction.Commit();
}
}
catch (Exception e)
{
tcs.TrySetException(e);
}
tcs.TrySetResult("");
}));
EventHandler.Raise();
return tcs.Task;
}
/// <summary>
/// Runs an Action, uses TaskCompletionSource to communicate when done
/// </summary>
/// <param name="action">Action to run</param>
/// <param name="doc">Revit Document</param>
/// <returns></returns>
public static Task Run(Action action, Document doc)
{
var tcs = new TaskCompletionSource<string>();
Queue.Add(new Action(() =>
{
try
{
action.Invoke();
}
catch (Exception e)
{
tcs.TrySetException(e);
}
tcs.TrySetResult("");
}));
EventHandler.Raise();
return tcs.Task;
}
/// <summary>
/// A failures preprocesser that clears any failures that occur within a transaction
/// </summary>
internal class IgnoreAllWarnings : IFailuresPreprocessor
{
public FailureProcessingResult PreprocessFailures(FailuresAccessor failuresAccessor)
{
var failList = failuresAccessor.GetFailureMessages();
foreach (FailureMessageAccessor failure in failList)
{
failuresAccessor.DeleteWarning(failure);
}
return FailureProcessingResult.Continue;
}
}
#endregion
}
}
+8 -18
View File
@@ -1,27 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="MSBuild.Sdk.Extras/3.0.44">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageProjectUrl>https://github.com/Speckle-Next/xunit-Revit</PackageProjectUrl>
<RepositoryUrl>https://github.com/Speckle-Next/xunit-Revit</RepositoryUrl>
<PackageTags>xunit revit runner</PackageTags>
<Authors>Speckle</Authors>
<Company>Speckle</Company>
<Description>xUnit runner utilities for Revit 2023</Description>
<PackageIconUrl>https://avatars2.githubusercontent.com/u/2092016</PackageIconUrl>
<PackageIcon>xunit.png</PackageIcon>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<AssemblyName>xUnitRevitUtils</AssemblyName>
<RootNamespace>xUnitRevitUtils</RootNamespace>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<Description>xUnit runner utilities for Revit 2023</Description>
<PackageId>xUnitRevitUtils.2023</PackageId>
<Version>1.0.5</Version>
<AssemblyVersion>1.0.5.0</AssemblyVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ModPlus.Revit.API.2023" Version="1.0.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="Speckle.Revit.API" Version="2023.0.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="xunit" Version="2.4.2" />
</ItemGroup>
</Project>
@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<package >
<metadata>
<id>xUnitRevitUtils.2023</id>
<version>$version$</version>
<title>$title$</title>
<authors>$author$</authors>
<owners>$author$</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="expression">MIT</license>
<projectUrl>https://github.com/Speckle-Next/xunit-Revit</projectUrl>
<iconUrl>https://avatars2.githubusercontent.com/u/2092016</iconUrl>
<description>$description$</description>
<releaseNotes></releaseNotes>
<copyright>Copyright 2022</copyright>
<tags>xunit revit</tags>
<dependencies>
<dependency id="ModPlus.Revit.API.2023" version="1.0.0" />
<dependency id="xunit" version="2.4.1" />
</dependencies>
</metadata>
</package>
-191
View File
@@ -1,191 +0,0 @@
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using Autodesk.Revit.UI.Selection;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Xunit;
namespace xUnitRevitUtils
{
/// <summary>
/// Utility class with methods and properties used by the xUnit Revit plugin
/// </summary>
public static class xru
{
public static UIApplication Uiapp { get; set; }
private static List<Action> Queue { get; set; }
private static ExternalEvent EventHandler { get; set; }
public static SynchronizationContext UiContext { get; set; }
public static void Initialize(UIApplication uiapp, SynchronizationContext uiContext, ExternalEvent eventHandler, List<Action> queue)
{
Uiapp = uiapp;
UiContext = uiContext;
EventHandler = eventHandler;
Queue = queue;
}
#region utility methods
/// <summary>
/// Returns the selected elements in the active document
/// </summary>
/// <returns></returns>
public static List<Element> GetActiveSelection()
{
Assert.NotNull(Uiapp);
if (Uiapp.ActiveUIDocument != null)
return Uiapp.ActiveUIDocument.Selection.GetElementIds().Select(x => Uiapp.ActiveUIDocument.Document.GetElement(x)).ToList();
return new List<Element>();
}
/// <summary>
/// Opens and activates a document if not open already
/// </summary>
/// <param name="filePath">Path to the file to open</param>
public static Document OpenDoc(string filePath)
{
Assert.NotNull(Uiapp);
Document doc = null;
//OpenAndActivateDocument only works if run from the current context
UiContext.Send(x => { doc = Uiapp.OpenAndActivateDocument(filePath).Document; }, null);
Assert.NotNull(doc);
return doc;
}
/// <summary>
/// Creates a new empty document
/// </summary>
/// <param name="templatePath">Path to the project template</param>
/// <param name="filePath">Path where to save the new doc</param>
/// <param name="overwrite">If true overwrites existing files with same name</param>
/// <returns></returns>
public static Document CreateNewDoc(string templatePath, string filePath, bool overwrite = true)
{
Assert.NotNull(Uiapp);
Document doc = null;
try
{
if (overwrite && File.Exists(filePath))
File.Delete(filePath);
}
catch { }
//OpenAndActivateDocument only works if run from the current context
UiContext.Send(x =>
{
//if already open, just use it
if (!File.Exists(filePath))
{
doc = Uiapp.Application.NewProjectDocument(templatePath);
doc.SaveAs(filePath);
doc.Close();
}
doc = Uiapp.OpenAndActivateDocument(filePath).Document;
}
, null);
Assert.NotNull(doc);
return doc;
}
/// <summary>
/// Runs an Action in a Revit transaction, uses TaskCompletionSource to communicate when done
/// </summary>
/// <param name="action">Action to run</param>
/// <param name="doc">Revit Document</param>
/// <param name="transactionName">Transaction Name</param>
/// <param name="ignoreWarnings">Enable to swallow all warnings generated by the transaction and prevent them from being raised within Revit</param>
/// <returns></returns>
public static Task RunInTransaction(Action action, Document doc, string transactionName = "transaction", bool ignoreWarnings = false)
{
var tcs = new TaskCompletionSource<string>();
Queue.Add(new Action(() =>
{
try
{
using (Transaction transaction = new Transaction(doc, transactionName))
{
transaction.Start();
if (ignoreWarnings)
{
var options = transaction.GetFailureHandlingOptions();
options.SetFailuresPreprocessor(new IgnoreAllWarnings());
transaction.SetFailureHandlingOptions(options);
}
action.Invoke();
transaction.Commit();
}
}
catch (Exception e)
{
tcs.TrySetException(e);
}
tcs.TrySetResult("");
}));
EventHandler.Raise();
return tcs.Task;
}
/// <summary>
/// Runs an Action, uses TaskCompletionSource to communicate when done
/// </summary>
/// <param name="action">Action to run</param>
/// <param name="doc">Revit Document</param>
/// <returns></returns>
public static Task Run(Action action, Document doc)
{
var tcs = new TaskCompletionSource<string>();
Queue.Add(new Action(() =>
{
try
{
action.Invoke();
}
catch (Exception e)
{
tcs.TrySetException(e);
}
tcs.TrySetResult("");
}));
EventHandler.Raise();
return tcs.Task;
}
/// <summary>
/// A failures preprocesser that clears any failures that occur within a transaction
/// </summary>
internal class IgnoreAllWarnings : IFailuresPreprocessor
{
public FailureProcessingResult PreprocessFailures(FailuresAccessor failuresAccessor)
{
var failList = failuresAccessor.GetFailureMessages();
foreach (FailureMessageAccessor failure in failList)
{
failuresAccessor.DeleteWarning(failure);
}
return FailureProcessingResult.Continue;
}
}
#endregion
}
}
@@ -1,12 +1,5 @@
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using Autodesk.Revit.UI.Selection;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Xunit;
namespace xUnitRevitUtils
@@ -17,13 +10,10 @@ namespace xUnitRevitUtils
public static class xru
{
public static UIApplication Uiapp { get; set; }
private static List<Action> Queue { get; set; }
private static IList<Action> Queue { get; set; }
private static ExternalEvent EventHandler { get; set; }
public static SynchronizationContext UiContext { get; set; }
public static void Initialize(UIApplication uiapp, SynchronizationContext uiContext, ExternalEvent eventHandler, List<Action> queue)
public static void Initialize(UIApplication uiapp, SynchronizationContext uiContext, ExternalEvent eventHandler, IList<Action> queue)
{
Uiapp = uiapp;
UiContext = uiContext;
@@ -33,12 +23,11 @@ namespace xUnitRevitUtils
#region utility methods
/// <summary>
/// Returns the selected elements in the active document
/// </summary>
/// <returns></returns>
public static List<Element> GetActiveSelection()
public static IList<Element> GetActiveSelection()
{
Assert.NotNull(Uiapp);
@@ -55,12 +44,28 @@ namespace xUnitRevitUtils
Assert.NotNull(Uiapp);
Document doc = null;
//OpenAndActivateDocument only works if run from the current context
UiContext.Send(x => { doc = Uiapp.OpenAndActivateDocument(filePath).Document; }, null);
UiContext.Send(x => doc = Uiapp.OpenAndActivateDocument(filePath).Document, null);
Assert.NotNull(doc);
return doc;
}
/// <summary>
/// Closes the provided Revit document
/// </summary>
/// <param name="doc">Revit document to be closed</param>
/// <param name="saveChanges">If true, saves changes to document before closing</param>
/// <returns>
/// Bool indicating whether or not the document was successfully closed
/// </returns>
public static bool CloseDoc(Document doc, bool saveChanges = false)
{
if (doc == null)
return false;
var result = false;
UiContext.Send(x => result = doc.Close(saveChanges), null);
return result;
}
/// <summary>
/// Creates a new empty document
/// </summary>
@@ -78,7 +83,9 @@ namespace xUnitRevitUtils
if (overwrite && File.Exists(filePath))
File.Delete(filePath);
}
catch { }
catch
{
}
//OpenAndActivateDocument only works if run from the current context
UiContext.Send(x =>
@@ -98,7 +105,6 @@ namespace xUnitRevitUtils
return doc;
}
/// <summary>
/// Runs an Action in a Revit transaction, uses TaskCompletionSource to communicate when done
/// </summary>
@@ -114,20 +120,18 @@ namespace xUnitRevitUtils
{
try
{
using (Transaction transaction = new Transaction(doc, transactionName))
{
transaction.Start();
if (ignoreWarnings)
{
var options = transaction.GetFailureHandlingOptions();
options.SetFailuresPreprocessor(new IgnoreAllWarnings());
transaction.SetFailureHandlingOptions(options);
}
action.Invoke();
transaction.Commit();
}
using var transaction = new Transaction(doc, transactionName);
transaction.Start();
if (ignoreWarnings)
{
using var options = transaction.GetFailureHandlingOptions();
options.SetFailuresPreprocessor(new IgnoreAllWarnings());
transaction.SetFailureHandlingOptions(options);
}
action.Invoke();
transaction.Commit();
}
catch (Exception e)
{
@@ -139,7 +143,6 @@ namespace xUnitRevitUtils
EventHandler.Raise();
return tcs.Task;
}
/// <summary>
@@ -167,7 +170,6 @@ namespace xUnitRevitUtils
EventHandler.Raise();
return tcs.Task;
}
/// <summary>
@@ -187,8 +189,6 @@ namespace xUnitRevitUtils
return FailureProcessingResult.Continue;
}
}
#endregion
}
}