1

Is there a way in Illustrator to scale the artboards with their content at once? Like scaling tool on an image? I have around 100 diffrent sized artboard and most importantly they are all named correctly already, I don't want to do it again.

Because I have them in diffrent ratios, and I can't just use a script where you need to type the size of an artboard it needs to scale to. I need something, where you can type like a scale you want the arboards to be magnify by, like 300%. Does anyone stumbled upon sth like this?

0

1 Answer 1

1

Ok this is what you do. You make a script that makes rectangles out of your artboards. Then Manipulate everything the way you want using the rectangles as geometry. Ignore your artboards. Then use a second script to copy artboard sizes back from you rectangles keeping in mind that arboards can only be rectangles not tilted rectangles so rotation by 90 degree increments is ok but 45 not.

Some quick test scripts. Probably not ready for all corner cases yet.

// jooArtbrd2rect.jsx
//
// Make rectangles out of artboards into a artboard layer


#target illustrator


artbrd2rect(app.activeDocument, "artboard squares");


function artbrd2rect(doc, ablayername){

  artbrds = doc.artboards;
  
  try {
    layer = doc.layers.getByName(ablayername);
  } catch (error) {
    layer = doc.layers.add();
    layer.name = "artboard squares";
  }
  
  for (i = 0; i < artbrds.length; i++) {
    bounds = artbrds[i].artboardRect;
    rect = layer.pathItems.rectangle(bounds[1], bounds[0], 
                bounds[2] - bounds[0], bounds[1] - bounds[3]);
    rect.filled = false;
    rect.stroked = false;
    rect.name = artbrds[i].name;
  }
}

and

// jooRect2artbrd.jsx
//
// Make artboards out of bounds of objects in a artboard layer


#target illustrator


rect2artbrd(app.activeDocument, "artboard squares");


function rect2artbrd(doc, ablayername){
  
  layer = doc.layers.getByName(ablayername);
  paths = layer.pathItems;
  artbrds = doc.artboards;
  
  for (i = 0; i < paths.length; i++) {
    bounds = paths[i].geometricBounds;
    ab = artbrds.getByName(paths[i].name);
    ab.artboardRect = bounds
  }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.