Skip to content

Commit

Permalink
Merge branch 'refs/heads/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Nice3point committed Apr 2, 2024
2 parents 4044473 + c4b4ad5 commit 02f57a8
Show file tree
Hide file tree
Showing 141 changed files with 409 additions and 1,851 deletions.
Binary file modified .nuget/PackageIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 5 additions & 7 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
# 4.0.0-preview.2.0

- Downgrade dependencies for Revit 2025 compability
- Rename some files
- Bug fixes

# 4.0.0-preview.1.0
# 4.0.1

- Revit 2025 support
- Inversion of Control support
- Nuke 8.0.0 support
- New icons
- New templates for single dll applications and modular solutions
- New samples https://github.com/Nice3point/RevitTemplates/tree/develop/samples
- Wiki updated https://github.com/Nice3point/RevitTemplates/wiki/Templates
- Wiki updated https://github.com/Nice3point/RevitTemplates/wiki/Multiple-Revit-Versions
- Jetbrains Rider don't respect solution templates for now. Please use CLI or VS22

# 3.2.2

Expand Down
20 changes: 11 additions & 9 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<picture>
<source media="(prefers-color-scheme: dark)" width="800" srcset="https://github.com/Nice3point/RevitTemplates/assets/20504884/cb0992f1-927f-4937-a87b-0e9657318c05">
<img alt="RevitLookup" width="800" src="https://github.com/Nice3point/RevitTemplates/assets/20504884/ddeb2dd2-e3e9-46f8-a643-4176a09c8560">
</picture>
<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" width="750" srcset="https://github.com/Nice3point/RevitTemplates/assets/20504884/cb0992f1-927f-4937-a87b-0e9657318c05">
<img alt="RevitLookup" width="750" src="https://github.com/Nice3point/RevitTemplates/assets/20504884/ddeb2dd2-e3e9-46f8-a643-4176a09c8560">
</picture>
</p>

# Create your Add-In for Revit on the .Net platform now
## Create your Add-In for Revit on the .Net platform

![](https://img.shields.io/nuget/v/Nice3point.Revit.Templates?style=for-the-badge)
![](https://img.shields.io/nuget/dt/Nice3point.Revit.Templates?style=for-the-badge)
![](https://img.shields.io/github/last-commit/Nice3point/RevitTemplate/develop?style=for-the-badge)
[![Nuget](https://img.shields.io/nuget/vpre/Nice3point.Revit.Templates?style=for-the-badge)](https://www.nuget.org/packages/Nice3point.Revit.Templates)
[![Downloads](https://img.shields.io/nuget/dt/Nice3point.Revit.Templates?style=for-the-badge)](https://www.nuget.org/packages/Nice3point.Revit.Templates)
[![Last Commit](https://img.shields.io/github/last-commit/Nice3point/RevitTemplate/develop?style=for-the-badge)](https://github.com/Nice3point/RevitTemplate/commits/main)

This repository contains a project templates for creating Revit Add-In

Expand All @@ -32,4 +34,4 @@ This repository contains a project templates for creating Revit Add-In

- To create a project use the IDE or run `dotnet new`
- To create a release run `nuke`
- For more help, read [Wiki](https://github.com/Nice3point/RevitTemplates/wiki)
- For more help, read [Wiki](https://github.com/Nice3point/RevitTemplates/wiki)
8 changes: 4 additions & 4 deletions RevitTemplates.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputPath>output</OutputPath>
<TargetFramework>net8.0</TargetFramework>
<NoWarn>$(NoWarn);NU5128;NU5110;NU5111</NoWarn>
<IncludeContentInPack>true</IncludeContentInPack>
<NoDefaultExcludes>true</NoDefaultExcludes>
<IncludeBuildOutput>false</IncludeBuildOutput>
<IncludeContentInPack>true</IncludeContentInPack>
<ContentTargetFolders>content</ContentTargetFolders>
<NoDefaultExcludes>true</NoDefaultExcludes>
<OutputPath>output</OutputPath>
<NoWarn>$(NoWarn);NU5128;NU5110;NU5111</NoWarn>
</PropertyGroup>

<PropertyGroup>
Expand Down
28 changes: 0 additions & 28 deletions build/Build.Compile.cs

This file was deleted.

2 changes: 1 addition & 1 deletion build/Build.Configuration.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
sealed partial class Build
{
const string Version = "4.0.0-preview.2.0";
const string Version = "4.0.1";
readonly AbsolutePath ArtifactsDirectory = RootDirectory / "output";
readonly AbsolutePath ChangeLogPath = RootDirectory / "Changelog.md";

Expand Down
19 changes: 16 additions & 3 deletions build/Build.Pack.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using Nuke.Common.Git;
using System.IO.Enumeration;
using Nuke.Common.Git;
using Nuke.Common.Tools.DotNet;
using static Nuke.Common.Tools.DotNet.DotNetTasks;

sealed partial class Build
{
Target Pack => _ => _
.DependsOn(Compile)
.DependsOn(Clean)
.OnlyWhenStatic(() => IsLocalBuild || GitRepository.IsOnMainOrMasterBranch())
.Executes(() =>
{
Expand All @@ -16,7 +17,7 @@ sealed partial class Build
.SetConfiguration(configuration)
.SetVersion(Version)
.SetOutputDirectory(ArtifactsDirectory)
.SetVerbosity(DotNetVerbosity.Minimal)
.SetVerbosity(DotNetVerbosity.minimal)
.SetPackageReleaseNotes(CreateNugetChangelog()));
});

Expand All @@ -37,4 +38,16 @@ static string EscapeMsBuild(string value)
.Replace(";", "%3B")
.Replace(",", "%2C");
}

List<string> GlobBuildConfigurations()
{
var configurations = Solution.Configurations
.Select(pair => pair.Key)
.Select(config => config.Remove(config.LastIndexOf('|')))
.Where(config => Configurations.Any(wildcard => FileSystemName.MatchesSimpleExpression(wildcard, config)))
.ToList();

Assert.NotEmpty(configurations, $"No solution configurations have been found. Pattern: {string.Join(" | ", Configurations)}");
return configurations;
}
}
4 changes: 2 additions & 2 deletions build/Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
<NoWarn>CS0649;CS0169</NoWarn>
<LangVersion>latest</LangVersion>
<ImplicitUsings>true</ImplicitUsings>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<NukeRootDirectory>..</NukeRootDirectory>
<NukeScriptDirectory>..</NukeScriptDirectory>
<NukeTelemetryVersion>1</NukeTelemetryVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Nuke.Common" Version="7.0.6"/>
<PackageReference Include="Nuke.Common" Version="8.0.0"/>
</ItemGroup>

<ItemGroup>
Expand Down
35 changes: 5 additions & 30 deletions samples/MultiProjectApplication/Module1/Module1.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,71 +9,46 @@
<Configurations>$(Configurations);Release R20;Release R21;Release R22;Release R23;Release R24;Release R25</Configurations>
</PropertyGroup>

<PropertyGroup Condition="$(Configuration.Contains('Debug'))">
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
<DefineConstants>$(DefineConstants);DEBUG</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(Configuration.Contains('Release'))">
<Optimize>true</Optimize>
<DebugType>none</DebugType>
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(Configuration.Contains('R20'))">
<RevitVersion>2020</RevitVersion>
<TargetFramework>net48</TargetFramework>
<DefineConstants>$(DefineConstants);R20</DefineConstants>
<DefineConstants>$(DefineConstants);R20_OR_GREATER</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(Configuration.Contains('R21'))">
<RevitVersion>2021</RevitVersion>
<TargetFramework>net48</TargetFramework>
<DefineConstants>$(DefineConstants);R21</DefineConstants>
<DefineConstants>$(DefineConstants);R20_OR_GREATER;R21_OR_GREATER</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(Configuration.Contains('R22'))">
<RevitVersion>2022</RevitVersion>
<TargetFramework>net48</TargetFramework>
<DefineConstants>$(DefineConstants);R22</DefineConstants>
<DefineConstants>$(DefineConstants);R20_OR_GREATER;R21_OR_GREATER;R22_OR_GREATER</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(Configuration.Contains('R23'))">
<RevitVersion>2023</RevitVersion>
<TargetFramework>net48</TargetFramework>
<DefineConstants>$(DefineConstants);R23</DefineConstants>
<DefineConstants>$(DefineConstants);R20_OR_GREATER;R21_OR_GREATER;R22_OR_GREATER;R23_OR_GREATER</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(Configuration.Contains('R24'))">
<RevitVersion>2024</RevitVersion>
<TargetFramework>net48</TargetFramework>
<DefineConstants>$(DefineConstants);R24</DefineConstants>
<DefineConstants>$(DefineConstants);R20_OR_GREATER;R21_OR_GREATER;R22_OR_GREATER;R23_OR_GREATER;R24_OR_GREATER</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(Configuration.Contains('R25'))">
<RevitVersion>2025</RevitVersion>
<TargetFramework>net8.0</TargetFramework>
<DefineConstants>$(DefineConstants);R25</DefineConstants>
<DefineConstants>$(DefineConstants);R20_OR_GREATER;R21_OR_GREATER;R22_OR_GREATER;R23_OR_GREATER;R24_OR_GREATER;R25_OR_GREATER</DefineConstants>
<TargetFramework>net8.0-windows</TargetFramework>
</PropertyGroup>

<PropertyGroup>
<Version>$(RevitVersion)</Version>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Nice3point.Revit.Build.Tasks" Version="1.*"/>
<PackageReference Include="Nice3point.Revit.Toolkit" Version="$(RevitVersion).*"/>
<PackageReference Include="Nice3point.Revit.Extensions" Version="$(RevitVersion).*"/>
<PackageReference Include="Nice3point.Revit.Api.RevitAPI" Version="$(RevitVersion).*-*"/>
<PackageReference Include="Nice3point.Revit.Api.RevitAPIUI" Version="$(RevitVersion).*-*"/>
<PackageReference Include="Nice3point.Revit.Api.RevitAPI" Version="$(RevitVersion).*"/>
<PackageReference Include="Nice3point.Revit.Api.RevitAPIUI" Version="$(RevitVersion).*"/>
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.*"/>
</ItemGroup>

<ItemGroup>
<Using Include="Autodesk.Revit.DB"/>
<Using Include="Nice3point.Revit.Extensions"/>
<Using Include="Nice3point.Revit.Toolkit.Utils"/>
<Using Include="JetBrains.Annotations"/>
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Autodesk.Revit.DB;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Module3;
using Module3.Enums;
Expand All @@ -21,9 +20,7 @@ private void SaveProjectName()
{
var connection = new DatabaseConnection(EntryKey.Data);
connection.BeginTransaction();

connection.Save("ProjectName", ProjectName);

connection.Close();
}
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 02f57a8

Please sign in to comment.