Why do you say "Of
course, this isn't working": your code looks nice
:-) .
One thing, however: your code looks to be ok for the "Visibility++"
method in InDesign, while you wrote "each are controlled with
visibility adors".
"Visibility++" = your InDesign layers are named according to the
values returned by your code (e.g. "RightAlignPreprint", etc.); your
code must return a string (as it currently does); one single
Visibility ADOR can control as many InDesign layers as needed; only
one of these layers will be visible at a given time (all others will
be hidden).
"Visibility" = your InDesign layers are named regardless of your
code; your code must return a boolean value (or 0/1), not a string;
one single Visibility ADOR "usually" controls one single InDesign
layers; should the same Visibility be applied to several layers,
these layers will all be visible at a given time.
Else, should you still suspect your code is wrong (I don't), you
could move it into a variable (instead of directly coding it in the
Visibility ADOR), use this variable in your Visibility ADOR, but
also use it in an extra Text ADOR, which you would then tag into an
InDesign text frame (located on a static layer), just so you see in
plain text what's the actual value returned by your code (for
debugging purpose).
You could do the same for your varLayout variable (= dumping its
value in a Text ADOR), to double check that your uStore dial returns
the expected value.
Or add some "ReportMessage("@{varLayout} = " & @{varLayout})"
etc. QLingo calls at the begining of your existing ADORs, then have
a look at the uProduce job messages.
Hi,
I have a product for uStore which has the option of 4
different layouts, each are controlled with visibility adors and
a single variable (varLayout). Each layout requires it's own
preprint layer. For proofing purposes, I wan't to display the
correct layout's preprint layer and hide the layer for print
output.
I'm using a visibility ador called Proof with the following
expression:
If (GetEnv("Job_Type") = "PROOF")
{
switch
(@{varLayout})
{
case
"Right":
"RightAlignPreprint"
case
"Left":
"LeftAlignPreprint"
case
"Center":
"CenterAlignPreprint"
case
"Top":
"TopAlignPreprint"
default:
""
}
}
else
{
""
}
My though process behind this was if it's a proof job type
and varLayout = Right, Left, Center, or Top display the
corresponding layer: "RightAlignPreprint", "LeftAlignPreprint",
"CenterAlignPreprint", "TopAlignPreprint"
Of course, this isn't working. Is there a better method
to achieve this or is there an error in the expression (I
haven't used a nested switch statement before).
--
You received this message because you are subscribed to the Google
Groups "XMPie Interest Group" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to xmpie-users...@googlegroups.com.
To post to this group, send email to xmpie...@googlegroups.com.
Visit this group at http://groups.google.com/group/xmpie-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.