Swap graphics/images…
I know it exists as a script BUT i've been waiting a loooong time to get a very basic SWAP function between 2 inDesign frames'content.
Say I have 2 frames on a page, one contains image A, the other contains image B.
I select the 2 frames, in object menu, I have one option (usually grayed out if 0, 1, 3 or more objects are selected) (+ same in contextual right-click menu).
That option says "swap images" (in french "permuter les images").
Everything in one frame goes to the other.
That implies groups of items.
That implies taking care of the adjust/resize options :
- If set for both frames, use frame options.
- If set for none : use previous coordinates.
- if set for one only : swap frame options too.
It shall work too if an image is selected, and not its frame.
Inside frames.
It sounds like a JDI feature, it already exists :
here :
http://www.indiscripts.com/post/2011/04/permutation-d-objets-dans-indesign-miniscript
or there :
http://indesign-faq.de/en/swapping_images_en
I know it's an install away, but it would be a nice addition.
-
rara commented
var doc = app.activeDocument;
var sel = doc.selection;if (sel.length != 2) {
alert("Please select exactly 2 groups OR 2 individual objects.");
} else {
var group1 = sel[0];
var group2 = sel[1];var group1_center = [group1.geometricBounds[1] + (group1.geometricBounds[3] - group1.geometricBounds[1]) / 2, group1.geometricBounds[0] + (group1.geometricBounds[2] - group1.geometricBounds[0]) / 2];
var group2_center = [group2.geometricBounds[1] + (group2.geometricBounds[3] - group2.geometricBounds[1]) / 2, group2.geometricBounds[0] + (group2.geometricBounds[2] - group2.geometricBounds[0]) / 2];var group1_new_center = [group2_center[0] - group1_center[0] + group1.geometricBounds[1], group2_center[1] - group1_center[1] + group1.geometricBounds[0]];
var group2_new_center = [group1_center[0] - group2_center[0] + group2.geometricBounds[1], group1_center[1] - group2_center[1] + group2.geometricBounds[0]];group1.move(group1_new_center);
group2.move(group2_new_center);
} -
Emily L. Heston commented
Every year at AdobeMAX I ask for this feature, and every year they say it's a great idea and will look into it. Like OP says, there's scripts for it, and sure you can apply a keyboard shortcut to that script, but a simple button would make us all so happy!
-
Jake Hammersmith commented
This feature really should be built in. But it shouldn't be limited to images -- let us swap any two objects. I frequently need to swap text boxes ("stories") in a magazine layout, and almost as often I need to swap a text box with a picture, or rotate 3 or more objects positions on a page.
So to be complete, let the SWAP feature also "rotate" the object positions when more than 2 are selected.
-
Brandon commented
The script that David posted is a great workaround, but I see no reason why this couldn't be handled natively via the Content Collector. When I try to swap two images using the Content Collector, it allows me to load both images into the conveyor but then when I replace one image, it updates the conveyor so that both are the same image, and I can't place the other one. I think I had a workaround at one point for that behavior, but why not just make it easier to do this?
-
David B commented
Script solution also discussed here: https://indesignsecrets.com/exchange-or-swap-two-images-free-indesign-script.php
-
Anonymous commented
Agreed! This seems like a basic enough function for this type of program. At my office we do photo layouts for a variety of reasons, and there is often a need to switch/swap photos. I work in an office of 30 people and all of our designers, architects, and marketing staff would be thrilled to have something like this.
-
Terry commented
Yes, this would be handy! I design a 72 page magazine and I always need to move pages around so "swapping" would be so handy. Martin, what scripts have you have found that work the best?
-
Maik commented
I'm curious: for what would you need to swap images in the frames or to swap the frames?
-
Martin Gjelstrup commented
Scenario: Multible pictures are placed in boxes/frames. Now I want to switch two pictures with eachother. Normally I would copy paste or insert a new photo. But it would be cool if you could say "switch" instead.