Page 1 of 1

Precision Parameter Not Working

Posted: Wed Feb 14, 2018 8:59 pm
by rgpepper
I have this defined as the body of an outgoing email in Switch v13 (and it works):
*********************
File: [Job.Name]
Pages: [Metadata.Text:Path="/pdfattrs/@pages",Dataset="Preflight",Model="XML"]
Colors: [Metadata.Text:Path="/pdfattrs/colors/color[1]/@base",Dataset="Preflight",Model="XML"]
Trim Box: [Switch.Calculation:Expression="[Stats.TrimBoxWidth]/72"] X [Switch.Calculation:Expression="[Stats.TrimBoxHeight]/72"]
Bleed Box: [Switch.Calculation:Expression="[Stats.BleedBoxWidth]/72"] X [Switch.Calculation:Expression="[Stats.BleedBoxHeight]/72"]
Media Box: [Switch.Calculation:Expression="[Stats.MediaBoxWidth]/72"] X [Switch.Calculation:Expression="[Stats.MediaBoxHeight]/72"]
Art Box: [Switch.Calculation:Expression="[Stats.ArtBoxWidth]/72"] X [Switch.Calculation:Expression="[Stats.ArtBoxHeight]/72"]
************************
Trying to use "Precision" to tame the number length. Changing just this one item (though I want to trim all 4 boxes) to this:

Trim Box: [Switch.Calculation:Expression="[Stats.TrimBoxWidth]/72", Precision="4"] X [Switch.Calculation:Expression="[Stats.TrimBoxHeight]/72", Precision="4"]
****************************
Results in this within the received email:
****************************
File: [Job.Name]
Pages: [Metadata.Text:Path="/pdfattrs/@pages",Dataset="Preflight",Model="XML"]
Colors: [Metadata.Text:Path="/pdfattrs/colors/color[1]/@base",Dataset="Preflight",Model="XML"]
Trim Box: [Switch.Calculation:Expression="[Stats.TrimBoxWidth]/72", Precision="4"] X [Switch.Calculation:Expression="[Stats.TrimBoxHeight]/72", Precision="4"]
Bleed Box: [Switch.Calculation:Expression="[Stats.BleedBoxWidth]/72"] X [Switch.Calculation:Expression="[Stats.BleedBoxHeight]/72"]
Media Box: [Switch.Calculation:Expression="[Stats.MediaBoxWidth]/72"] X [Switch.Calculation:Expression="[Stats.MediaBoxHeight]/72"]
Art Box: [Switch.Calculation:Expression="[Stats.ArtBoxWidth]/72"] X [Switch.Calculation:Expression="[Stats.ArtBoxHeight]/72"]

Re: Precision Parameter Not Working

Posted: Tue Feb 20, 2018 7:26 am
by r.zegwaard
Are you sure that you've set the body-text property as "Define multi-line with variables"? (instead of "Edit multi-line text")

Re: Precision Parameter Not Working

Posted: Tue Feb 20, 2018 8:00 pm
by rgpepper
I did indeed choose "Define Multi-Line...."

Re: Precision Parameter Not Working

Posted: Wed Feb 21, 2018 7:19 am
by r.zegwaard
The problem is caused by the space in the variable-definitions. When i edit one of you're variables, Switch gives an error message. Because of such an error, Switch seems to stop evaluating variable-expressions.

So remove the spaces in all variables....
screenshot.PNG
screenshot.PNG (8.66 KiB) Viewed 6527 times

Re: Precision Parameter Not Working

Posted: Wed Feb 21, 2018 5:20 pm
by rgpepper
That was the ticket! Thank You so much!