Sets the units offered by the two unit dropdowns of the measurement settings dialog. A missing list keeps its current value; unknown units are ignored with a warning.
Known units: 'in', 'mm', 'cm', 'pt', 'ft', 'ft-in', 'm', 'yd', 'km', 'mi'. A selected unit that is not in the new list is still shown.
Parameters
Optionalunits: {from?:string[];to?:string[]}
{ from, to } lists of unit names.
Optionalfrom?: string[]
Units offered for the page distance, such as 'in' or 'mm'.
Optionalto?: string[]
Units offered for the real-world distance.
Returns void
Example
instance.UI.setMeasurementUnits({ from: ['mm', 'cm', 'in'], to: ['m', 'km'] });
Sets the units offered by the two unit dropdowns of the measurement settings dialog. A missing list keeps its current value; unknown units are ignored with a warning. Known units:
'in','mm','cm','pt','ft','ft-in','m','yd','km','mi'. A selected unit that is not in the new list is still shown.