Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Access XML_ID of pageItem/groupItem

New Here ,
Oct 29, 2014 Oct 29, 2014

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

TOPICS
Scripting
593
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Guide ,
Oct 29, 2014 Oct 29, 2014

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; 

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Nov 02, 2014 Nov 02, 2014
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines