• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

change the position of art-board along with objects

Explorer ,
Aug 17, 2017 Aug 17, 2017

Copy link to clipboard

Copied

Hello everyone.

i am able to change the position of art-board but i could not move the objects after changing art-board position.

For example this is the image of art-board

when i move this art-board via scripting

var aDoc = app.activeDocument; 

var doc=app.activeDocument;

//var abSrc = aDoc.artboards[0]; 

var abIdx = aDoc.artboards.getActiveArtboardIndex (); 

var abSrc = aDoc.artboards[abIdx]; 

var moveX = 400; 

var moveY = 500; 

 

var abSrc_L = abSrc.artboardRect[0] + moveX; 

var abSrc_T = abSrc.artboardRect[1]  + moveY

var abSrc_R = abSrc.artboardRect[2] + moveX ; 

var abSrc_B = abSrc.artboardRect[3] +moveY

abSrc.artboardRect = [abSrc_L, abSrc_T, abSrc_R, abSrc_B];

doc.selectObjectsOnActiveArtboard();     

this is how it has changed after running the script the object is not moved

please help me if someone has the idea how to approach.

thanks and regards,

Yuvi

TOPICS
Scripting

Views

278

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Adobe