Inspiring
March 21, 2023
Answered
Moving a group with ExtendScript
- March 21, 2023
- 1 reply
- 1144 views
Hello, everyone,
I am using ExtendScript to move groups of objects into certain locations on an Illustrator art board. It had been working up until now, when I had to change the positions. Now when I try to run the script, the positions of the objects are off by about 1.417 points.
I have an action in Illustrator that sets the origin point to the top left corner, and then runs the javaScript. Here is the code:
app.activeDocument.artboards[0].rulerOrigin = [0,0];
var alpha = app.activeDocument.layers.getByName('Layer 2').groupItems[0];
alpha.position = [0, 0];
//This puts the top left corner of the group at the location x = 1.4173 pt, y = 1.4173 pt.
Can anyone help me figure out what I am doing incorrectly?
Thanks!
