Revit subversion different in 2020 and earlier

I just noticed that when getting the Revit subversion in Revit 2020 and older, it doesn’t give you the complete number

print pyrevit.revit.HOST_APP.subversion

When running this in 2021 and newer, I get the sub version like this: 2022.1.30
However, if I run this in 2020 or older, it gives me : 2020.2 even though the actual number is 2020.2.90

Revit API docs shows that there was an update to this property in 2021, so I’m wondering if there is another way to get the full subversion in older versions?

app_build = __revit__.Application.VersionBuild
see if it gives you something different

1 Like

This is the route I wound up going. VersionBuild gives you the actual build number for the update, which isn’t what the user sees in Revit, so I wound up making a dictionary that holds the Base Revit Version as a key and then a list of Subversion and build number as the value. This way I have access to all 3 pieces of information. I can use the build number to match to the running version, but the subversion for user-facing information

revitBuildNumbers = {"2023":["2023.1.10", "20221122_1550"],
                     "2022":["2022.1.30", "20220520_1515"],
                     "2020":["2020.2.90", "20220517_1515"],
                     "2019":["2019.2.60", "20220224_1700"],