Grid Arranger
Script for Adobe Illustrator
ㅤ
Description
The Grid Arranger script is a powerful tool for Adobe Illustrator that helps users arrange selected objects in a customizable grid layout. It provides precise control over columns, rows, spacing, and alignment, with live preview functionality. The script is particularly useful for creating organized layouts, pattern designs, icon sets, and any work requiring precise object arrangement.
ㅤ
Key Features
- Customizable grid dimensions (rows and columns)
- Adjustable horizontal and vertical spacing (gutters)
- Multiple sorting options for object arrangement
- Alignment controls for both horizontal and vertical positioning
- Interactive UI with sliders and numeric inputs
- Live preview of changes
- Random ordering option
ㅤ
Installation
- Place the script in your Illustrator Scripts folder:
MacOS: /Applications/Adobe Illustrator <Version>/Presets/<Language>/Scripts
Windows: C:\Program Files\Adobe\Adobe Illustrator <Version>\Presets\<Language>\Scripts
- Restart Adobe Illustrator to load the script into the File > Scripts menu.
ㅤ
Using the Script
- Select at least two objects in your Adobe Illustrator document
- Run the Grid Arranger script from the File > Scripts menu.
- The dialog window will appear with multiple options:

ㅤ
ㅤ➊ Grid Configuration
ㅤ➋ Spacing Controls
ㅤ➌ Sorting Options
ㅤ➍ Additional Options
ㅤ➎ Applying Changes
ㅤ
ㅤ
➊ Grid Configuration
The Grid section controls how your selected objects are arranged in rows and columns.
Here's a detailed breakdown of its functionality:

1.1 Columns
Enter the desired number of columns directly in the input field.
Use the slider to adjust the value.
Click the ▥ column icon to increment by 1.
The script automatically calculates the appropriate number of rows.
ㅤ
1.2. Rows
Enter the desired number of rows directly in the input field.
Use the slider to adjust the value.
Click the ▤ row icon to increment by 1.
The script automatically calculates the appropriate number of columns
ㅤ
Tip: You can use arrow keys for fine control: Up/Down: Change by 1; Shift + Up/Down: Change by 10.
ㅤ
The grid values update in real-time, and you can see the preview of your arrangement as you adjust these settings. This makes it easy to find the ideal grid configuration for your layout.
ㅤ
ㅤ
➋ Spacing Controls
The Gutter section controls the spacing and alignment between objects in your grid.
It has two main components:

2.1 Horizontal Spacing (↔︎)
Controls the space between columns.
Enter the desired horizontal spacing in pixels.
Use the slider for visual adjustment.
Click the horizontal spacing icon ↔︎ to increment by 1.
Negative values are supported for overlapping.
Select horizontal alignment: Left, Center, or Right.
ㅤ
Horizontal Alignment Options:
Left: Aligns objects to the left of their grid cells.
Center: Centers objects horizontally in their grid cells.
Right: Aligns objects to the right of their grid cells.
ㅤ
2.2 Vertical Spacing (↕︎)
Controls the space between rows.
Enter the desired vertical spacing in pixels.
Use the slider for visual adjustment.
Click the vertical spacing icon ↕︎ to increment by 1.
Negative values create overlapping.
Select vertical alignment: Top, Center, or Bottom.
ㅤ
Vertical Alignment Options:
Top: Aligns objects to the top of their grid cells
Center: Centers objects vertically in their grid cells
Bottom: Aligns objects to the bottom of their grid cells
ㅤ
The Gutter section provides precise control over object spacing and alignment, with immediate visual feedback as you adjust the settings.
ㅤ
ㅤ
➌ Sorting Options
The Sorting Options section determines how objects are arranged within the grid.
ㅤ
Sort Items By Dropdown: Contains five sorting methods:

1. Position Y (Top to Bottom)
Arranges objects based on their vertical position.
Objects higher on the artboard go first.
Fills grid from top to bottom, left to right.
ㅤ
2. Position X (Left to Right)
Arranges objects based on their horizontal position.
Objects further left go first.
Fills grid from left to right, top to bottom.
ㅤ
3. Total Size (Largest Area First)
Arranges objects based on their total area (width × height).
Largest objects go first.
Useful for creating hierarchical layouts.
ㅤ
4. Width (Widest First)
Arranges objects based on their width only.
Widest objects go first.
Useful when width is the primary concern.
ㅤ
5. Height (Tallest First)
Arranges objects based on their height only.
Tallest objects go first.
Useful when height is the primary concern.
ㅤ
ㅤ
➍ Additional Options
ㅤ
Group: Create a group containing all arranged items.
Reversed Order: Reverse the sorting direction.
Random Order: Randomize item positions before arranging.
ㅤ
ㅤ
Additional Notes
All changes are previewed in real-time.
Preview updates automatically as you adjust settings.
Original positions are restored if you cancel.
Click the ⏼ icon at the bottom right side of the panel to open the script’s user guide online.
ㅤ
ㅤ
➎ Applying Changes
ㅤ
Click OK to apply the arrangement.
Click Cancel to revert to original positions.
ㅤ
Keyboard Shortcuts
Up/Down Arrow Keys: Fine-tune values in input fields.
Enter: Apply changes
Esc: Cancel and close dialog
ㅤ
ㅤ
☻ Final Notes
The Grid Arranger script streamlines the often tedious process of creating precise grid layouts in Adobe Illustrator.
Whether you're designing icon sets, creating pattern designs, or organizing complex layouts, this tool offers the flexibility and precision needed for professional results.
ㅤ
ㅤ