Autodesk.Revit.Sdk.Refs.2021
1.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Autodesk.Revit.Sdk.Refs.2021 --version 1.0.0
NuGet\Install-Package Autodesk.Revit.Sdk.Refs.2021 -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Autodesk.Revit.Sdk.Refs.2021" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Autodesk.Revit.Sdk.Refs.2021 --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Autodesk.Revit.Sdk.Refs.2021, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Autodesk.Revit.Sdk.Refs.2021 as a Cake Addin #addin nuget:?package=Autodesk.Revit.Sdk.Refs.2021&version=1.0.0 // Install Autodesk.Revit.Sdk.Refs.2021 as a Cake Tool #tool nuget:?package=Autodesk.Revit.Sdk.Refs.2021&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Autodesk.Revit.SDK.Refs
Revit SDK refs assemblies.
Only metadata from assemblies by Refasmer.
Usage
Add project configurations with revit versions in name
<PropertyGroup>
<RevitVersion>2016</RevitVersion>
<TargetFramework>net45</TargetFramework>
<Configurations>Debug;Release;D2016;D2017;D2018;D2019;D2020;D2021;D2022;D2023;D2024</Configurations>
</PropertyGroup>
Add package reference
<ItemGroup>
<PackageReference Include="Autodesk.Revit.Sdk.Refs.$(RevitVersion)" Version="*" />
</ItemGroup>
Create <RevitVersion> build props
<Project>
<PropertyGroup Condition="$(Configuration.Contains('<RevitVersion>'))">
<RevitVersion><RevitVersion></RevitVersion>
<TargetFramework><TargetFramework></TargetFramework>
</PropertyGroup>
<PropertyGroup Condition="'$(RevitVersion)' != '' and $(RevitVersion) == <RevitVersion>">
<DefineConstants>$(DefineConstants);REVIT_<RevitVersion></DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(RevitVersion)' != '' and $(RevitVersion) <= <RevitVersion>">
<DefineConstants>$(DefineConstants);REVIT_<RevitVersion>_OR_LESS</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(RevitVersion)' != '' and $(RevitVersion) >= <RevitVersion>">
<DefineConstants>$(DefineConstants);REVIT_<RevitVersion>_OR_GREATER</DefineConstants>
</PropertyGroup>
</Project>
Build Revit Project
See sample project in this folder.
You should compile the Debug configuration.
Other configurations needs to help write code with constants.
dotnet cli
dotnet build -c <Configuration> -p:RevitVersion=<RevitVersion>
nuke build
DotNetBuild(s => s
.DisableNoRestore()
.SetProjectFile(<ProjectName>)
.SetConfiguration(<Configuration>)
.SetProperty("RevitVersion", (int) RevitVersion.Rv<RevitVersion>));
Defined constants
This constants defined to all supports revit version.
REVIT_<RevitVersion>
REVIT_<RevitVersion>_OR_LESS
REVIT_<RevitVersion>_OR_GREATER
Usage defined constants
#if REVIT_<RevitVersion>
// This code will be available for the specified version
#endif
#if REVIT_<RevitVersion>_OR_LESS
// This code will be available for all versions less than specified
#endif
#if REVIT_<RevitVersion>_OR_GREATER
// This code will be available for all versions greater than specified
#endif
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net48 is compatible. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.8
- Newtonsoft.Json (>= 11.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.