Skip to main content
Ka-Tja
Community Expert
Community Expert
May 23, 2019
Question

How to make loop to continue in new artboard?

  • May 23, 2019
  • 1 reply
  • 475 views

Hi,

I’m a newbie in JavaScript and I need your help.

I have a loop, that creates some items and arrange them on the artboard. If there is no more place in the first artboard, I want that my loop will continue on the new created artboard.

The script creates new artboard when there is no more place (and it makes artboard active), but I can’t find out, how to make loop to continue on the new artboard.

Can somebody give me a clue?

This topic has been closed for replies.

1 reply

CarlosCanto
Community Expert
Community Expert
May 23, 2019

use app.coordinateSystem = CoordinateSystem.ARTBOARDCOORDINATESYSTEM;

at the beginning of your script, then when you make and activate your new artboard, reset to x,y to left/top corner and it continue on the new artboard

Ka-Tja
Community Expert
Ka-TjaCommunity ExpertAuthor
Community Expert
May 24, 2019

Thanks a lot.