Page 1 of 1
Sorting files by trimbox size -Rounding
Posted: Mon Aug 26, 2013 2:48 am
by PatBuckley
Hi,
I am using Switch to sort files based on trimbox width and height. Some files are not exactly the correct size by less than 0.1 mm but I want to allow these small inaccuracies through. Is there a rounding function?
I am currently using:
[Switch.Calculation:Expression="[Stats.TrimBoxWidth]*0.352777778",Precision="1"]
Regards
Pat Buckley
Sorting files by trimbox size -Rounding
Posted: Mon Aug 26, 2013 3:39 pm
by freddyp
Yes, there is a round function in Switch-Calculation. When you select Switch-Calculation there is a description field in the variables pane with the following text:
Arithmetic expression to be calculated. Arithmetic operations, parentheses, numbers and function 'round' are allowed in 'Expression' argument
Freddy
Sorting files by trimbox size -Rounding
Posted: Mon Aug 26, 2013 10:35 pm
by PatBuckley
Hi Freddie,
Yes I saw that but not sure how to implement it. Can you give me some guidance as to what the line of code should look like?
Regards
Pat B
Sorting files by trimbox size -Rounding
Posted: Tue Aug 27, 2013 10:23 am
by freddyp
round([Stats.TrimBoxWidth]*0.352777778)
when you are entering the calculated function. The complete variable will look like this"
[Switch.Calculation:Expression="round([Stats.TrimBoxWidth]*0.352777778)",Precision="1"]
Freddy
Sorting files by trimbox size -Rounding
Posted: Thu Aug 29, 2013 11:56 pm
by PatBuckley
Thanks Freddy that is perfect. I was a bit concerned that I couldn't tighten the accuracy at first but I found that moving the decimal place on the multiplyer (*0.352777778) to (*3.52777778) and also moving the decimal place on the expected value (size) so the accuracy would fault the job out if it was 0.05mm out as opposed to a generous 0.5mm out.
Thanks again.
Regards
Pat Buckley