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

Access XML_ID of pageItem/groupItem

New Here ,
Oct 29, 2014 Oct 29, 2014

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

TOPICS
Scripting

Views

549

Translate

Translate

Report

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

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; 

}

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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