uCreate Visibility Control Objects

669 views
Skip to first unread message

jstacy

unread,
Sep 19, 2008, 7:10:45 PM9/19/08
to XMPie Interest Group
I am trying to use a Visibility Content Object for choosing a layer.
uCreate does not allow you to create and define a Content Object like
uDirect, so I have done this in uPlan. However, I cannot find
reference in the Documentation on how to reference layers in QLingo.

I am new to this and have a deadline.

Any help direction would be appreciated.

John

George Marsh

unread,
Sep 20, 2008, 4:38:25 PM9/20/08
to xmpie...@googlegroups.com
Layers visibility is quite straightforward, you can either use one
object to switch between several layers at once by using strings for
the layer names, or you can do one for each layer with a 0 or 1 or
Boolean value. Back in uCreate you simply select the layers one at a
time, select the visibility object and then click the layer visibility
icon underneath the ador list. You then get a confirmation dialog so
you can be clear what has been applied where. I'm sure this is in the
help file, but I'd be the first to accept that documentation is one of
the weakest areas of xmpie's offering. Good luck. Let me know if an
example file would help you with this.

jstacy

unread,
Sep 21, 2008, 4:10:00 PM9/21/08
to XMPie Interest Group
Thanks George,

I figured it out shortly after adding Post. I used the Boolean example
from the uPlan User Guide (pg117). I would like to use just one VCO,
create a function and apply that function to the VCO in the future.
Any thoughts, examples of this would be welocomed.

I had set this up as follows, but had no clue how to reference the
layers.

if([|->CLASS]=67)
{
?//Layer reference
}
else if([|->CLASS]=68)
{
?//Layer reference
}
else if([|->CLASS]=69)
{
?//Layer reference
}

If I am way off, I would appreciate any help. Can you use the "switch"
command?

Thanks again,

John Stacy

Tim Perrett

unread,
Sep 21, 2008, 4:30:27 PM9/21/08
to XMPie Interest Group
John,

Visibility objects effectivly need to return a bool. The concept is
this: returning true turns the layer on, returning false turns it off.
This is if you have one layer.

An alternitive is if you have many layers and a single VCO then you
return the exact name of the layer as a string.

Without knowing how your indesign document works I cant say which is
better for your situation.

Does this help?

Timothy Perrett

the loop: http://blog.timperrett.com
lift: http://liftweb.net

George Marsh

unread,
Sep 21, 2008, 5:54:41 PM9/21/08
to xmpie...@googlegroups.com
John

This example would work, just replace your question mark with the name
of the layer in InDesign contained in "double inverted commas" - this
is a string in uPlan. Then if you apply this object to the layers you
wish to control they will be activated by the logic.

A switch would be cleaner and easier to maintain:

switch([|->CLASS])
{
case: 67
"Layer67"//Layer reference
case: 68
"Layer68"//Layer reference
default:
"default_layer"
}

This syntax may be wrong but I don't have uPlan handy right now - just
right click and insert the example switch statement, however if you
are testing a string case then the case value must be in "double
inverted commas/straight quotation marks". The default case is for
when you want to set a value that is not captured by the logic, this
is similar to the final else value in an if statement.

I'm not sure about how you'd do this with a function, we usually
create variables to simplify and normalise our logic, but I can't
recall doing any 2 jobs where the visibility setup was similar enough
to create a function. We tend to use these for currency and date
formatting.

Hope this helps.

George

John Stacy

unread,
Sep 21, 2008, 7:57:42 PM9/21/08
to xmpie...@googlegroups.com
Thanks again George,

How does this look? I think my issue was that I could not understand how the
expression new what "class67" was. I realized the connection is made when
you link the VCO to the layer, sort of like using "this".

If([|->CLASS] = 67)
{
"class67"//Layer name in InDesign doc
}
else if([|->CLASS] = 68)
{
"class68"
}
else if([|->CLASS] = 69)
{
"class69"
}
else if([|->CLASS] = 70)
{
"class70"
}

Or

switch([|->CLASS])
{
case: 67
"class67"//Layer name in InDesign doc
case: 68
"class68"//Layer name in InDesign doc
case: 69
"class69"//Layer name in InDesign doc
case: 70
"class70"//Layer name in InDesign doc
default:
"class67"//Layer name in InDesign doc
}


John
____________________________________________________________________________
____________
John Stacy € Design Services € AlphaGraphics Seattle € 206.448.9100 x144
http://us297.alphagraphics.com


Reply all
Reply to author
Forward
0 new messages