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
-
- Newbie
- Posts: 8
- Joined: Tue Aug 20, 2013 11:52 am
Sorting files by trimbox size -Rounding
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
Arithmetic expression to be calculated. Arithmetic operations, parentheses, numbers and function 'round' are allowed in 'Expression' argument
Freddy
-
- Newbie
- Posts: 8
- Joined: Tue Aug 20, 2013 11:52 am
Sorting files by trimbox size -Rounding
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
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
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
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
-
- Newbie
- Posts: 8
- Joined: Tue Aug 20, 2013 11:52 am
Sorting files by trimbox size -Rounding
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
Thanks again.
Regards
Pat Buckley