From 3a47da138c8ef26974456d8bd641fbc32118bd35 Mon Sep 17 00:00:00 2001 From: Dan Rumery Date: Sun, 27 Jun 2021 14:06:09 +1000 Subject: [PATCH] Add some missing Revit 2022 version checks --- AddinDeployment/RemoveAddinAllVersions.bat | 4 ++++ BatchRvtUtil/Scripts/revit_file_list.py | 2 ++ BatchRvtUtil/Scripts/revit_file_version.py | 3 +++ 3 files changed, 9 insertions(+) diff --git a/AddinDeployment/RemoveAddinAllVersions.bat b/AddinDeployment/RemoveAddinAllVersions.bat index 04990e5..ab216b2 100644 --- a/AddinDeployment/RemoveAddinAllVersions.bat +++ b/AddinDeployment/RemoveAddinAllVersions.bat @@ -30,6 +30,10 @@ echo. echo Removing BatchRvt addin for Revit 2021 call RemoveAddin.bat 2021 +echo. +echo Removing BatchRvt addin for Revit 2022 +call RemoveAddin.bat 2022 + echo Done. echo. diff --git a/BatchRvtUtil/Scripts/revit_file_list.py b/BatchRvtUtil/Scripts/revit_file_list.py index dd4f9d7..39eb382 100644 --- a/BatchRvtUtil/Scripts/revit_file_list.py +++ b/BatchRvtUtil/Scripts/revit_file_list.py @@ -215,6 +215,8 @@ def __init__(self, revitFilePathData): revitVersionNumber = RevitVersion.SupportedRevitVersion.Revit2020 elif any(revitVersionText.StartsWith(prefix) for prefix in revit_file_version.REVIT_VERSION_TEXT_PREFIXES_2021): revitVersionNumber = RevitVersion.SupportedRevitVersion.Revit2021 + elif any(revitVersionText.StartsWith(prefix) for prefix in revit_file_version.REVIT_VERSION_TEXT_PREFIXES_2022): + revitVersionNumber = RevitVersion.SupportedRevitVersion.Revit2022 self.revitVersionText = revitVersionText self.revitVersionNumber = revitVersionNumber return diff --git a/BatchRvtUtil/Scripts/revit_file_version.py b/BatchRvtUtil/Scripts/revit_file_version.py index 92901d9..c0e49c3 100644 --- a/BatchRvtUtil/Scripts/revit_file_version.py +++ b/BatchRvtUtil/Scripts/revit_file_version.py @@ -204,6 +204,7 @@ def GenerateRevitVersionTextPrefixes(revitVersionNumberText, includeDisciplineVe REVIT_VERSION_TEXT_PREFIXES_2019 = GenerateRevitVersionTextPrefixes("2019") REVIT_VERSION_TEXT_PREFIXES_2020 = GenerateRevitVersionTextPrefixes("2020") REVIT_VERSION_TEXT_PREFIXES_2021 = GenerateRevitVersionTextPrefixes("2021") +REVIT_VERSION_TEXT_PREFIXES_2022 = GenerateRevitVersionTextPrefixes("2022") def GetRevitVersionNumberTextFromRevitVersionText(revitVersionText): revitVersionNumberText = None @@ -234,5 +235,7 @@ def StartsWithOneOfPrefixes(text, prefixes): revitVersionNumberText = "2020" elif StartsWithOneOfPrefixes(revitVersionText, REVIT_VERSION_TEXT_PREFIXES_2021): revitVersionNumberText = "2021" + elif StartsWithOneOfPrefixes(revitVersionText, REVIT_VERSION_TEXT_PREFIXES_2022): + revitVersionNumberText = "2022" return revitVersionNumberText