Smart Object Replacer
Script for Adobe Illustrator
✦ Available exclusively on Patreon for Pro supporters.
ㅤ
Description
Smart Object Replacer is a powerful Adobe Illustrator script that streamlines the process of replacing multiple selected objects with a source object. Whether you need to replace objects with clipboard content, use an existing object from your selection, or apply a document symbol across multiple targets, this script provides flexible options to automate repetitive replacement tasks.
ㅤ
Key Features
- Multiple Source Options - Replace with clipboard content, selected objects, or document symbols
- One-click Workflow - Automates tedious manual copy-paste-resize tasks
- Smart Sizing - Fit to bounds or copy exact dimensions with aspect ratio control
- Style Matching - Copy colors, opacity, and blend modes from target objects
- Flexible Targeting - Replace whole groups or individual items within groups
- Non-destructive Option - Keep original objects while adding replacements
ㅤ
Installation
1. Download the Smart Object Replacer.jsx script file.
2. Place the script 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 Adobe Illustrator if it's already running.
ㅤ
Run the Script
- Open a document in Adobe Illustrator
- Select the objects you want to replace
- Execute the script from the File > Scripts > Smart Object Replacer
- The Smart Object Replacer dialog will appear with multiple options:
ㅤ

ㅤ
Using the Script
ㅤ
➊ Choose Your Source Object
In the "Replace Selected Objects With" panel, select one of four options:
ㅤ
🅰 Clipboard Content
- When to use: When you've copied an object you want to use as replacement
- How it works: Uses whatever is currently in your clipboard
- Tip: Copy your desired replacement object before running the script
ㅤ
🅱 Topmost Selected Object
- When to use: When you want to use the front-most selected object as your source
- How it works: The object at the top of the stacking order becomes the replacement template
- Note: This object won't be replaced (it becomes the source)
ㅤ
🅲 Bottommost Selected Object
- When to use: When you want to use the back-most selected object as your source
- How it works: The object at the bottom of the stacking order becomes the replacement template
- Note: This object won't be replaced (it becomes the source)
ㅤ
🅳 Document Symbol
- When to use: When you want to use a symbol from your Symbols panel
- How it works: Creates instances of the selected symbol
- Setup: Choose from the dropdown menu of available document symbols
ㅤ
ㅤ
➋ Configure Source Group Options
If your source object is a group, use the "Source Group Options" panel:
ㅤ
- Unchecked: Uses the entire group as one replacement object
- Checked: Uses individual items within the group as separate sources
ㅤ
When "Pick from Group" is enabled:
- All in group (consecutively): Cycles through group items in order
- All in group (randomly): Randomly selects items from the group for each replacement
ㅤ
ㅤ
➌ Set Replacement Options
Configure how replacements should be sized and positioned:
ㅤ
Sizing Options (choose one):
- Fit to element size: Scales replacement to fit within target bounds (maintains aspect ratio)
- Copy width & height: Makes replacement exactly the same size as target (may distort aspect ratio)
- Neither checked: Uses replacement object's original size
ㅤ
Additional Options:
- Keep target objects: Preserves original objects instead of deleting them
- Match target colors: Applies the target's fill color to the replacement
- Match target opacity: Sets replacement opacity to match the target
- Match target blending mode: Applies target's blend mode to replacement
ㅤ
ㅤ
➍ Handle Target Groups
Use the "Target Group Options" panel when you have groups selected:
- Replace groups as a whole: Treats entire groups as single replacement targets
- Replace individual grouped items: Replaces each item inside groups separately
ㅤ
ㅤ
➎ Execute the Replacement
- Click OK to start the replacement process
- Watch the progress bar as replacements are made
- Use Cancel to abort the operation
- Use the ⏼ button to fit your selection in the current view
ㅤ
ㅤ
☻ Wrap-up
The Smart Object Replacer is a comprehensive tool that transforms tedious manual replacement tasks into efficient automated processes.
Its intuitive interface combined with powerful options makes it suitable for both simple replacements and complex design workflows involving groups, symbols, and precise visual matching.
ㅤ
ㅤ