Precision Parameter Not Working

Post Reply
rgpepper
Member
Posts: 80
Joined: Wed Oct 14, 2015 2:09 am

Precision Parameter Not Working

Post 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"]
r.zegwaard
Member
Posts: 93
Joined: Fri Jul 08, 2011 10:31 am
Location: The Netherlands

Re: Precision Parameter Not Working

Post 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")
rgpepper
Member
Posts: 80
Joined: Wed Oct 14, 2015 2:09 am

Re: Precision Parameter Not Working

Post by rgpepper »

I did indeed choose "Define Multi-Line...."
r.zegwaard
Member
Posts: 93
Joined: Fri Jul 08, 2011 10:31 am
Location: The Netherlands

Re: Precision Parameter Not Working

Post 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 6478 times
rgpepper
Member
Posts: 80
Joined: Wed Oct 14, 2015 2:09 am

Re: Precision Parameter Not Working

Post by rgpepper »

That was the ticket! Thank You so much!
Post Reply