DisplayUnitType revit api
//Pre 2021
DisplayUnitType displayUnitType = fp.DisplayUnitType;
value = UnitUtils.ConvertFromInternalUnits(nullable.Value, displayUnitType).ToString();
//2021
ForgeTypeId forgeTypeId = fp.GetUnitTypeId();
value = UnitUtils.ConvertFromInternalUnits(nullable.Value, forgeTypeId).ToString();