When calculated with below:
mm3 = 20.000.000
m3
results in 0
further calculations with m3
result in 0
as well
we work with mm
but supplier delivers in cubic meters
we need to convert from mm^3
to m^3
for our calculations
'm3'
= 'mm3' * 1 * 10 ^ -9
@numerical-type: (
label: "m3"
decimals: 3
)
Welcome to the forum!
I am not entirely sure what your question is, but I think the explanation below may help.
For converting 20.000.000 mm^3
to m^3
, you have to multiply with 1 * 10 ^ -9
, which gives 0.02 m^3
. The application engine rounds to the nearest whole number, so the result of the conversion is and should be 0
.
Alan only stores whole numbers. If you need an accuracy of mm^3
for your computations, then that is the numerical type you should start with. If the supplier provides values in m^3
, you should convert them to mm^3
with the conversion rule = 'm3'...
shown below.
If you want to show mm^3
as m^3
in your application, you can use the @numerical-type:
GUI annotation as shown below. Please note that GUI annotations only affect how values are presented to the application user. They do not in any way affect calculations.
'mm3'
= 'm3'* 1 * 10 ^ 9 // conversion rule for converting 'm3' to 'mm3'
@numerical-type: ( // show mm3 as m3 in the ui, by moving the decimal point 9 places to the left
label: 'm3'
decimals: 9
)
thanks, the moving decimals was what I’ve overlooked.