Copy link to clipboard
Copied
Is it possible to access the XML_ID of a pageItem or groupItem via ExtendScript?
For example a layer name may be 'Active' but it's XML_ID (as viewed when setting Preferences > Identify Object By > XML ID) may be 'Active_1_' due to a copy and paste operation.
So the Object name would be groupItem.name but there is no groupItem.id or groupItem.xml_id for example?
Does anyone know a way to access these?
Many thanks,
Michael
Copy link to clipboard
Copied
not that I know of.
if all you need is to make sure all layers have unique names you could do something like:
var lay = app.activeDocument.layers;
for (var i = 0; i < lay.length; i++){
lay.name = lay.name + "." + lay.zOrderPosition;
}
Copy link to clipboard
Copied
Not sure if this is what your after, but under Preferences there is an option to "Identify Objects By: Object Name or XML ID"
I only just noticed it so not sure if it helps in any way