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

Unique layer identifier in CEP Extension

New Here ,
May 29, 2024 May 29, 2024

Copy link to clipboard

Copied

Is there any smart way to uniquely and persistently identify a layer within ExtendScript?

 

Whats the reason behind this:

I'm writing a CEP extension where the user can make some settings on a layer level that will then be used by the extension later on. Currently I'm saving the configured settings in the XMPMeta data of the file so that the user won't have to configure it each time.

 

This works great, but the problem is that the I'm currently using either the layer name or the layer index to link the Layer object with the stored meta data. Both of them can and should be modified by the user at free will. This means means I might not be able to correctly assign the stored meta data to the desired layer after next load up.  So having a unique persistent identifier would be great.

 

I've found some older discussions and this user request but hoped that by now there might be a some new information about this. It seems that PageItems already have a uuid property is there something similar for layers? 

TOPICS
Feature request , Scripting , SDK , Third party plugins

Views

97

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

correct answers 1 Correct answer

Community Expert , May 29, 2024 May 29, 2024

I could not find any sort of unique key for the layer being added to the DOM. I checked at

https://github.com/docsforadobe/illustrator-scripting-guide

Probably you would have to improvise something. I would say something like a hidden pageitem with some tag set to identify the layer uniquely

-Manan

Votes

Translate

Translate
Adobe
Community Expert ,
May 29, 2024 May 29, 2024

Copy link to clipboard

Copied

LATEST

I could not find any sort of unique key for the layer being added to the DOM. I checked at

https://github.com/docsforadobe/illustrator-scripting-guide

Probably you would have to improvise something. I would say something like a hidden pageitem with some tag set to identify the layer uniquely

-Manan

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