I've searched similar questions but none matched my need. Let's say you have a lot of rectangles with different width (12mm, 35mm, 6.54mm etc) and you want to add 2mm to each object's width, 1mm both left and right. I am trying to create a quick action but Transform tool doesn't have that ability and I've tried Transform again but it doesn't seem to work when saved as an action. Would it be possible to do this by using a script? Thanks in advance! Edit: the action I'm trying to make supposed to look like this: Copy- Paste in back- Transform- Deselect. Unfortunately, the Transform part is the one I can't make to work.


and welcome to GDSE. Here's my solution:

The trick is to save the transformation to a graphic style first. (As actions cannot record 'effects' directly, but they register applying graphic styles).

  1. Create a rectangle and apply the desired transformation:

The red square is the original one, and the blue one has Effect/Covert to Shape/Rectangleapplied to it. In this case it already is a rectangle, so we will only be using the extra width and height. (As so often in Illustrator there are many different ways to achieve this transformation, i.e. you could also duplicate the shape and move it by certain increments)

create the transformation

  1. Next save the appearance of the blue rectangle as a new graphic style:

save a new graphic style

  1. Now you can record an action:

As you described in your question, the action copies and pastes the square in back, applies the graphic style and expands the shape.

add the action

This will create a blue shape behind the red square, that is 2mm wider on the left and right side, and 4mm taller on the top and bottom.

  • Thanks for replying, I've been away for a few days. Good solution to transformation, however new issue arrives and that is the appearance of rectangle. Applying graphic style means that the object now has the color defined in that style. I know I sound like I'm nitpicking, but this is important when you have different CMYK values or Pantone colors. It's good file based solution, but I'm trying to find something that will work across a multitude of different files. I really like your use of Convert to shape, as I rarely use effect in AI, and it's given me few ideas. – user153753 Jun 8 '20 at 19:39
  • Hm, adding the colour-requirements to your question makes this quite a bit more difficult, as you'll no longer be able to use graphic styles to set your transformation. Perhaps then scripting is the only viable solution. I'd be interested in what you need this for, perhaps there is another way to tackle this. – dom Jun 9 '20 at 8:38
  • Basically, this would be used as a form of trapping. I've already created several actions for different purposes(offset path, stroke etc.). I'm creating design based actions, to somewhat automate file editing. I really hope that people at Adobe expand the possibilities of Transform to more than percentage option, but until that I will try to find a workaround – user153753 Jun 10 '20 at 8:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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