ricaun.Revit.FileInfo
1.0.0
Prefix Reserved
dotnet add package ricaun.Revit.FileInfo --version 1.0.0
NuGet\Install-Package ricaun.Revit.FileInfo -Version 1.0.0
<PackageReference Include="ricaun.Revit.FileInfo" Version="1.0.0" />
paket add ricaun.Revit.FileInfo --version 1.0.0
#r "nuget: ricaun.Revit.FileInfo, 1.0.0"
// 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.
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 theRevitVersion
of the file.RevitVersion
is anint
with the default value zero orRevitVersion.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 | Versions 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. |
-
.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 | 214 | 4/16/2023 |