I am trying to change units of current document, but it seems that Revit 2022 has changed DisplayUnitType API. Any hint on how call out the untis using new API?
Correct. DisplayUnitType
has been deprecated and replaced with ForgeTypeId
.
1 Like
Sorry, I missed that you already changed from DisplayUnitType
to UnitTypeId
and was thinking you needed the other type change. Make sure you have it typed correctly. You have “ID” instead of “Id”.
1 Like
Solved: unit.SetFormatOptions(SpecTypeId.Length,format)