Hi all.
UnitType is discontinued in Revit 2022. RevitAPIdocus suggesting to use “GetDataType()” instead of UnitType. UnitType is a property and “GetDataType()” is a method. Can anyone help me how to use “GetDataType()” instead of UnitType. Thank you in advance.
Hello,
so that forum members can help you, can you post your current code ?
1 Like
I recently had to replace this part of code
(UnitType.UT_Length).DisplayUnits
with this
(SpecTypeId.Length).GetUnitTypeId()
Maybe this will work for you. If not then you will need to provide your code as suggested by @c.poupin
1 Like