Swap Two Objects
✦ Available exclusively on Patreon for Pro supporters.
Script for Adobe Illustrator
ㅤ
Functionality
This script allows you to quickly swap the positions of two selected objects in Adobe Illustrator, with additional options to swap their sizes, opacity values, and blending modes. It's a useful productivity tool for designers who need to experiment with different layouts or object arrangements.
ㅤ
Installation
1. Download the Swap Two Objects.jsx script file.
2. Place it in your Adobe Illustrator Scripts folder:
⮑ Mac: /Applications/Adobe Illustrator <Version>/Presets/<Language>/Scripts/
⮑ Windows: C:\Program Files\Adobe\Adobe Illustrator <Version>\Presets\<Language>\Scripts\
3. Restart Illustrator if it's already running to load the script into the File > Scripts menu.
ㅤ
Using the Script

ㅤ
➊ Select Two Objects:
- Open a document and select exactly two objects.
- The script will not run if fewer or more than two objects are selected.
ㅤ
ㅤ
➋ Run the Script:
- Navigate to File > Scripts > Swap Two Objects.
- Alternatively, you can use the File > Scripts > Other Script... option to locate and run the script manually.
ㅤ
ㅤ
➌ Choose Reference Point
- Select which point of each object to use as the positioning reference.
- Click any of the 9 radio buttons.
ㅤ
ㅤ
➍ Choose Swap Mode:
A dialog box will appear with three radio button options:
ㅤ
-
Position Only
Swaps the positions of the selected objects without changing their size.
ㅤ
ㅤ


ㅤ
ㅤ
ㅤ
-
Position and Size (Maintain Aspect Ratio)
Swaps positions and resizes objects while maintaining their original aspect ratios.
ㅤ
ㅤ


ㅤ
ㅤ
ㅤ
-
Position and Size (Match Aspect Ratio)
Swaps positions and resizes objects to match each other's dimensions exactly.
ㅤ
ㅤ


ㅤ
➎ Optional Settings
- Check "Swap Opacity Values" to exchange transparency settings.
- Check "Swap Blending Modes" to exchange blend modes.
ㅤ
ㅤ
➏ Execute the Swap:
- Click the Swap button or press Enter to apply the selected swap mode.
- The objects will be repositioned and resized (if applicable) based on the selected mode.
ㅤ
ㅤ
➐ Additional Features:
ㅤ
Keyboard Shortcuts:
- Enter – Executes the swap.
- Escape – Closes the dialog.
- Up/Down Arrow Keys – Switches between swap mode options.
- Press 'O' to toggle opacity swap option.
- Press 'B' to toggle blending mode swap option.
ㅤ
- Click the ⏼ icon on the right for a user guide
- Click the ⊗ icon on the top left to close the panel.
ㅤ
ㅤ
☻ Conclusion:
This Swap Two Objects script streamlines your Illustrator workflow by eliminating tedious manual repositioning and resizing. Whether you're exploring layout alternatives, creating pattern variations, or simply organizing your artwork, this tool saves valuable design time with just a few clicks. The three swap modes give you flexibility for different design scenarios, while the intuitive interface makes it accessible for designers at any skill level.
Give it a try in your next project to experience how this simple utility can enhance your creative process and help you visualize design alternatives more efficiently.
ㅤ
ㅤ
1 comment
Add swap appearance object