Getting wrong stairs length/width from Python & Revit API

Here is an example using Revit 2022, but the import should be the same.

import clr

clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *

OUT = UnitUtils.Convert(11.7,UnitTypeId.Feet,UnitTypeId.Millimeters)

Keep in mind too that in R2021 the DisplayUnitType was depreciated, and then in R2022 is it replaced by the SpecTypeId, ForgeTypeId and UnitTypeId classes.

3 Likes