Decimal Places in BOM for Custom Properties
Is there a way to make this better?
Possible to round off to 2 decimal places? These are custom properties defined as double (I do need a number for agregation so I can see the total cost of an assembly for example)
Answers
-
it seems it might be an issue with the rounding function that maybe does not round properly?
Example here, first line seems ok but second line not:
Here is the function I'm using to calculate that parameter:
round(#cabinet_vol/(1e6 mm^3)-#LF_Displaced_Volume-#WA_Displaced_Volume-#HF_Displaced_Volume,0.1)
0 -
ok! I think I figured it out, I used RoundToPrecision instead of round…
But now I'm strugling with how to use RoundToPrecision in featurescript, it doesn't seem to work when I do this:
const weight = roundToPrecision(volume * definition.density, 2);
throws this error:
0


