Change image location (X and Y coordinates)

200 views
Skip to first unread message

rotero9

unread,
Jun 9, 2022, 6:07:26 PM6/9/22
to XMPie Interest Group
Hi everyone! I am new to xmpie. I have a project that uses layer visibility to turn ON or OFF a layer depending on the data. If image exists at this location show image and turn this layer ON, if not, show this other layer. Works like a charm. This new project, however cannot use this layer visibility feature. Is it possible to change the image X and Y coordinates instead? Right now my image X Y are: (1.4025 in, 3.118 in). How can I change them to (-1.9925 in, 3.118 in)? Thank you for your help in advance!

Adrian Mueller

unread,
Jun 13, 2022, 12:54:47 PM6/13/22
to XMPie Interest Group
Is there a reason layers cannot be used? Because you could have two layers with the image...one at the first coordinates and one at the second. Then your visibility ADOR would look in the data for whatever criteria it will need to turn on one, the other or neither.

rotero9

unread,
Jun 15, 2022, 8:20:41 AM6/15/22
to XMPie Interest Group
It's weird requirement for this project. We're trying to minimize layer visibility within the project. I thought a solution could be change the X and Y of the images as necessary. If it's even possible. Thank you!

eko...@gmail.com

unread,
Jun 15, 2022, 7:37:44 PM6/15/22
to XMPie Interest Group
Here is a method that theoretically works using a dynamically generated XMPie XNIP XML and InDesign tables. I used uPlan for my tests, but I believe that the same approach works in uCreate. The idea is to dynamically write a XNIP "text file" into a standard text ADOR. And while we dynamically write the code, we influence the XML code which defines the width and height of the table cells.

The approach would have to be stress tested and it is NOT suggested when printing many records in the same print file. Images cannot be cached since we're using an InDesign table to float the images into the desired x,y position. InDesign also gets weird when switching the Plan Objects.

These screenshots show how the x,y in the ADORs drive the x,y position in inches of the variable image (set to proportionally fit and center). The rulers are visible to illustrate the distances from 0,0.

Image 1 position 1.jpg
Image 2 position 2.jpg

In the XNIP XML, there are 3 references that we need to influence with Variables for x and y coordinates. Two references are in inches and the other is in points (72pt per inch). You'll also notice that I had to escape all of the " characters using \".
.
xnip xml.jpg

As I mentioned above, this method needs to be tested for your specific application and is not suggested for use with repeatable image assets since the variable images cannot be cached. 

Ed Kotnik

rotero9

unread,
Jun 16, 2022, 9:41:01 AM6/16/22
to XMPie Interest Group
Great! I'll look into this solution. Thank you for pointing me in the right direction. Cheers. 
Reply all
Reply to author
Forward
0 new messages