ricaun.Revit.FileInfo 1.0.0

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
dotnet add package ricaun.Revit.FileInfo --version 1.0.0
NuGet\Install-Package ricaun.Revit.FileInfo -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="ricaun.Revit.FileInfo" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ricaun.Revit.FileInfo --version 1.0.0
#r "nuget: ricaun.Revit.FileInfo, 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 ricaun.Revit.FileInfo as a Cake Addin
#addin nuget:?package=ricaun.Revit.FileInfo&version=1.0.0

// Install ricaun.Revit.FileInfo as a Cake Tool
#tool nuget:?package=ricaun.Revit.FileInfo&version=1.0.0

ricaun.Revit.FileInfo

ricaun.Revit.FileInfo library allows to check the version of an Autodesk Revit file (.rvt, .rfa, .rte, .rft) without opening.

Revit 2024 Visual Studio 2022 Nuke License MIT Build .NET Framework 4.0 Release

PackageReference

<PackageReference Include="ricaun.Revit.FileInfo" Version="*" />

Example

using ricaun.Revit.FileInfo;
RevitVersion revitVersion = RevitFileInfo.GetRevitVersion(filePath);

or

RevitFileInfo revitFileInfo = new RevitFileInfo(filePath);
bool isValid = revitFileInfo.IsValid;
RevitVersion revitVersion = revitFileInfo.Version;

RevitFileInfo

  • IsValid: Check if the file is a valid Revit file extension. (.rvt, .rfa, .rte, .rft)
  • Version: Get the RevitVersion of the file. RevitVersion is an int with the default value zero or RevitVersion.Unknown.

BasicFileInfo

To find the version of the Revit file the BasicFileInfoUtils is used, and a regex is used to find the version in te Revit Build: or Format: info.

  • Revit 2018 and below: Revit Build: Autodesk Revit 2018 (Build: 20170106_1515(x64)).
  • Revit 2019 and above: Format: 2019.

A Unit test is used to check if the regex is working correctly between the different Revit file versions (2014-2024).

References

This project was inspired by the following projects:

License

This project is licensed under the MIT Licence.


Do you like this project? Please star this project on GitHub!

Product Compatible and additional computed target framework versions.
.NET Framework net40 is compatible.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 156 4/16/2023