Copy link to clipboard
Copied
Hello -
I have objects or groups on a page that are labeled with numbers (e.g. "Q1" "A1" "Q2" "A2" etc...).
If I duplicate the spread or page - those objects are relabeled up one value - so Q1 becomes Q2 on the new page...
If I have multiple items, the duplicates are labeled from the last number. So if I have Q1- Q7 on one page, in the new page, the items are listed as Q8 - Q14.
Is there a way to stop this from happening and just duplicate them exactly?
Thanks!
Ah, buttons. Why didn't you say so straight away?
The name you see in the Layers panel is the name used in the Buttons and Forms panel. It's dangerous to have non-unique names for buttons because various button actions use names as referents. Identical names cause ambiguity, which you don't want. You can't prevent InDesign from changing the button's name when you duplicate it.
If that ambiguity is not a problem for you, the only way is to rename the duplicated items manually. Which is a hass
...Copy link to clipboard
Copied
What do you mean by 'labels'? Can you show a screenshot?
Copy link to clipboard
Copied
How they are named in the layers panel
Copy link to clipboard
Copied
Labels in the Layers panel are static, just plain text How do you get the labels to change when you duplicate an item? Do you use a plug-in that manages page items through layer names?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Ah, buttons. Why didn't you say so straight away?
The name you see in the Layers panel is the name used in the Buttons and Forms panel. It's dangerous to have non-unique names for buttons because various button actions use names as referents. Identical names cause ambiguity, which you don't want. You can't prevent InDesign from changing the button's name when you duplicate it.
If that ambiguity is not a problem for you, the only way is to rename the duplicated items manually. Which is a hassle. A script is possible that adds the names of selected items as script labels before you duplicate the item(s), then after duplicating them renames them on the basis of the script labels.
Anyway, to answer your question, no, you can't prevent the renaming of buttons.
Copy link to clipboard
Copied
yeah - i understand the logic behind non-duplicate button names when on the same page, but wondering why it renames when duplicating an entire page. i am not advanced enough for scripts. is there a tutorial on how to create and utilize them? I would greatly speed up my workflow to be able to duplicate a page and have all the buttons keep their original names.
Copy link to clipboard
Copied
> wondering why it renames when duplicating an entire page
Because a button can reference another button on another page. Those relations aren't confined to a page.
> i am not advanced enough for scripts. is there a tutorial on how to create and utilize them?
Google around, there are some posts on this forum that give overviews of available material. Count on a steep learning curve.
What you're after is in fact easy to script (see below), maybe it works for you.
1, Before using it, save your document and make a copy or zip it up.
2. Then select one or more boxes and run the script. The script adds script labels, you can see those in the Script Label panel (Window > Utilities > Script Label). Select a button and the label is shown.
3. Duplicate the selection.
4. Run the script again. It now renames the buttons on the Layers and the Buttons panels.
Note: the script works only on selections. So if you duplicate a page or a spread, first select the buttons on the spread and run the script. Then duplicate the page or spread. Finally, select the buttons on the duplicated page/spread and run the script again.
(function () {
var s = app.selection;
for (var i = 0; i < s.length; i++) {
if (s[i] instanceof Button && s[i].label === '') {
s[i].label = s[i].name;
} else {
s[i].name = s[i].label;
}
}
}());
Copy link to clipboard
Copied
i'll give it a shot. thank you!
Copy link to clipboard
Copied
Hi @imgaryshap74 ,
you can show and also edit the label of an individual item selected with InDesign's Script Label panel:
Windows > Utilities > Script label
Note:
If you have more items selected with different labels the Script Label panel will show no contents.
If you have more items selected with the same labels the Script Label panel will show the contents.
If you want empty labels for all selected items, your buttons for example, do the following:
[1] If the Script Label panel shows some contents edit and remove the contents in the panel.
[2] If the Script Label panel shows no contents because every label is different, do the following 2-step process:
Type some contents so that all labels share the same contents and unselect the selection of elements to store the labels.
Select your items again and then as step 2 remove the contents of the Script Label panel.
Unselect the selection and all selected items share empty labels.
Regards,
Uwe Laubender
( Adobe Community Expert )