DynamoVisualProgramming.DynamoServices by Autodesk

<PackageReference Include="DynamoVisualProgramming.DynamoServices" Version="3.4.0-beta6416" />

 Display

class Display
Data used to set display and formatting preferences for Dynamo UI
using Autodesk.DesignScript.Runtime; using System; using System.Linq; namespace DynamoUnits { [Obsolete("This type will be removed in a future version of Dynamo, please use PreferenceSettings.NumberFormat instead. ")] [IsVisibleInDynamoLibrary(false)] internal class Display { [IsVisibleInDynamoLibrary(false)] public enum NumberFormat { Decimal, Fraction } [IsVisibleInDynamoLibrary(false)] public static string PrecisionFormat { get; set; } = "f4"; [IsVisibleInDynamoLibrary(false)] public static int Precision { get { return Convert.ToInt16(PrecisionFormat.ToCharArray().Last().ToString()); } } [IsVisibleInDynamoLibrary(false)] public static NumberFormat UnitNumberFormat { get; set; } = NumberFormat.Decimal; [IsVisibleInDynamoLibrary(false)] public static bool RemoveTrailingZeros { get; set; } = true; } }