- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to display some internal values to the user formatted to their preferences by using UnitsManager.formatInternalValue, however it doesn't seem to be adjusting the precision properly. For example, the user preferences are set as such (with default Unit of mm):
When I run the following snippet:
adsk.core.Application.get().activeProduct.unitsManager.formatInternalValue(0.123456789, adsk.core.Application.get().activeProduct.unitsManager.defaultLengthUnits)
Then I would expect the return string to be:
1.235 mm
However, the returned value is:
1.2345679 mm
(note that it is actually rounding at the 7th decimal place)
Am I misunderstanding how the formatting system is supposed to work, or is this a bug?
edit: I am currently using version 2.0.11415.
Solved! Go to Solution.