Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe Illustrator Resizing artboards with actions

  • Resizing artboards with actions

     Keldon Rush updated 1 month, 1 week ago 7 Members · 8 Posts
  • James Boggs

    November 4, 2010 at 3:27 pm

    I have a few hundred vector files each of various sizes. Using the Actions window I can create actions to resize the vector shapes to the scale that I want by recording select all then entering the dimensions I want in the transform window. I can play that action on the other files and it works fine. But I want them all to appear centered on a 4″x4″ artboard. When I go to the artboard tool and enter the dimensions I want for the board, it doesn’t record the action. Any ideas on how I could easily resize the artboards for many files?


  • les nemeth

    November 4, 2010 at 10:19 pm

    Unfortunately AI does not have this functionality (at least not in CS4). Dunno about CS5.

    However, you can do this if you have a Wacom pen, because you can assign keyboard macros to the pen (or any of its buttons) or by creating a popup menu and assign a macro to a popup menu item. And also, you need a PC because Macs don’t have keyboard navigation equivalents (so you cannot move to a certain text field or other dialog box control by pressing certain keys).

    With this said…

    You can edit the artboard by simply pressing Alt+O. Then pressing ENTER will open the Artboard Options dialog. In the dialog you can navigate to the Width box by pressing Alt+W and typing a value, then pressing Alt+H to navigate to the Height box and typing the value. Then simply pressing ENTER will close the dialog and pressing ESC will get out of artboard mode. And there’s your new artboard resized.

    You take all these keyboard commands/navigations and enter it into any of the Wacom’s buttons or popup menu items. Then simply recall it with the touch of a button.

  • James Boggs

    November 5, 2010 at 5:09 pm

    Thanks, using macros is a great idea. I still have to open each file individually, but still easier. I probably won’t use my wacom’s buttons though, I found a freeware program called AutoHotkey that should do the trick. and FYI it doesn’t work in CS5 because that is what I’m using. Unfortunately resizing the vectors didn’t work either. You can record an action to resize them, but it records the action to resize it by a certain percentage of the original size. The files I tested it on were about the same size as the file that I recorded the action with, so I thought it was resizing them to the specific size I wanted, but when I ran it on all my files it scaled them based on a percent of their original size and not to the specif dimensions I put in. So I guess using macros for both problems will be my best solution. Thanks for the suggestion and quick response!

  • Jason Warth

    August 24, 2011 at 1:08 am

    I’m not sure if you’ve been over-thinking this, or if the ability I’m about to describe was unavailable at the time of your post. In either case, there is a MUCH simpler solution than using a third-party macro.

    When recording an Action in Illustrator (or when editing an Action), click on the fly-out menu in the upper-right corner of the Actions panel and select “Insert Menu Item.” This will open a dialog box in which you can type the name (or partial name) of a menu command and click “Find.” (Note: instead of typing the command, you can instead click through to the actual menu item you’re seeking—which is a bit counterintuitive, since normally, menus are disabled when a dialog box is open.)

    In either case, the menu item you’re looking for is “Fit to Artwork Bounds,” which will resize the artboard to the exact height and width of the document’s artwork. (Note: “Fit to Selected Art” is a similar option, but differs in that it resizes the artboard according to the selected art, rather than all the art in the document, as the previous option does.)

    Whatever method you choose (i.e. the “Find” button, or actually selecting the menu item), once the correct menu command appears in the dialog box, click on “OK.” Now, your action contains this command. Make sure to stop the recording of your action (unless you were editing a an already-recorded action, in which case, it should already be stopped).

    Hope that helps!


    P.S. If you’re curious, these menu commands are found under the “Objects” > “Artboards” menu.

  • Max Stein

    March 26, 2013 at 8:06 pm

    This was very helpful!

  • Ron Troyer

    October 26, 2015 at 5:09 pm

    So, as an update to this, the way that I did it was to combine the “Fit to Artboard Bounds” and other options to resize the artboard to a specific width.

    I recorded creating a rectangle, resizing that rectangle to my desired artboard size, then the “Fit to Artboard Bounds”, then deleting my template rectangle.

  • Steve Hix

    April 14, 2016 at 7:02 pm

    That works great, except ACTIONS won’t record the last step “Fit to artwork bounds” or “Fit to selected artwork” which I actually need. How were you able to record it?

  • Keldon Rush

    January 19, 2021 at 5:19 pm

    I found this question trying to batch resize over 1000 SVGs. I first used an action to resize the content, but could not change the size of the artboard. The solution I found worked because SVG files are text based. I used a text editor that supports finding and replacing characters across multiple files. In my case the originals were 32 x 32 px and I needed them to be 20 x 20 px. I replaced every instance of 0 0 32 32 in all 1015 SVG files with ‘0 0 20 20’. That got me half way two thirds of the way. Finally I had to run a batch action to select all and align to center / middle of artboard. Et voila. Thought I would drop this here in case anyone can save their files to SVG or already have SVG files to work with.

Viewing 1 - 8 of 8 posts

Log in to reply.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy