Skip to content

Commit

Permalink
Add some missing Revit 2022 version checks
Browse files Browse the repository at this point in the history
  • Loading branch information
DanRumery committed Jun 27, 2021
1 parent 7b97414 commit 3a47da1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions AddinDeployment/RemoveAddinAllVersions.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 2 additions & 0 deletions BatchRvtUtil/Scripts/revit_file_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions BatchRvtUtil/Scripts/revit_file_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 3a47da1

Please sign in to comment.