📅  最后修改于: 2022-03-11 14:58:21.128000             🧑  作者: Mango
public static double ConvertFromInternalUnits(double value, string displayUnitType)
{
if (string.IsNullOrWhiteSpace(displayUnitType))
throw new ArgumentNullException(nameof(displayUnitType));
var dut = (Autodesk.Revit.DB.DisplayUnitType)Enum.Parse(typeof(Autodesk.Revit.DB.DisplayUnitType), displayUnitType);
var result = Autodesk.Revit.DB.UnitUtils.ConvertFromInternalUnits(value, dut);
return result;
}