0 Replies Latest reply on Aug 18, 2017 1:00 AM by karth80472045

    change the position of art-board along with objects

    karth80472045 Level 1

      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