Skip to main content
Known Participant
January 26, 2024
Question

How to make the default selected artboard in Ai file by jsx?

  • January 26, 2024
  • 1 reply
  • 685 views

I have there artboards in my Ai file and no artboard is active. I want the first artboard is selected after I open the Ai file. Can this setting be saved into Ai file itself? How to do this setting by jsx?

 

 

This topic has been closed for replies.

1 reply

CarlosCanto
Community Expert
Community Expert
January 26, 2024

there has to be an active artboard, always. The active artboard is saved with the document. The next time you open a document, the last active artboard remains active.

 

to set the 1st artboard as active artboard use the following

activeDocument.artboards.setActiveArtboardIndex(0)

 

 

Known Participant
January 26, 2024

I tried, no active artboard.

CarlosCanto
Community Expert
Community Expert
January 26, 2024

the UI doesn't refresh but the artboard is active after setting it.

 

you can try getting the name or the artboardRect to test it