In multi-cultural systems it may be important to handle imperial types on numbers.
In this MDriven-supported approach the value stored is always in the metric system - but you can allow for display and edit in Imperial-system.
The settings are controlled by a model pattern that is part of the SysTranslations merge model that is described here Documentation:Localization - MDrivenWiki.
The important setting for MetricImperial are:
SysCultureSettingsSingleton.MetricNotImperial:Boolean=true
This you would probably make derived - and let each user store their own value for this setting.
The functionality is used by setting a tagged value on an Attribute of type decimal,float,double,int of MetricImperial with one of the following values:
GramOunce,
MillimeterInch,
MilliliterFluidOunce,
CelsiusFahrenheit,
SquareKilometersSquareMiles,
SquareMetersSquareFeet,
SquareCentimetersSquareInches,
KilometersPerHourMilesPerHour,
MetersPerSecondFeetPerSecond
You may also set the MetricImperialUIDecimals tagged value to an integer to controls how many decimals are used after conversion. The default value if not given is 2*SysCultureSettingsSingleton.DefaultDecimalDisplay (DefaultDecimalDisplay defaults to 2 if not given).
Presentation unit
This functionality hi-jacks the PresentationUnit and sets it and updates it according to the MetricNotImperial setting.
Example:
Label : The temp (°C) will turn into The temp (°F) when MetricNotImperial=false