Skip to main content
Known Participant
July 11, 2024
Question

How do we access the AI Dictionary using ExtendScript

  • July 11, 2024
  • 2 replies
  • 479 views

Hi Folks,

How to store and retrieve the ArtWork dictionary data using extendscript in Adobe CEP Panel.

Thanks in advance

This topic has been closed for replies.

2 replies

Participant
July 22, 2024

Need help in setting & getting the dictionary information using Adobe CEP extension script from the adobe illustrator document.

below code I'm using to set and get the dictionary information in Adobe SDK(CPP). how set and get dictionary using Adobe CEP extension script.

AIDictionaryRef artDict;
AIDictKey verKey = sAIDictionary->Key("version");
ai::UnicodeString artVersion;
result = sAIDictionary->SetUnicodeStringEntry(artDict, verKey, artVersion);
aisdk::check_ai_error(result);

result = sAIDocument->GetDictionary(&artDict);
aisdk::check_ai_error(result);
AIDictKey verKey = sAIDictionary->Key("version");
ai::UnicodeString artVersion;
if (sAIDictionary->IsKnown(artDict, verKey)) {
result = sAIDictionary->GetUnicodeStringEntry(artDict, verKey, artVersion);
aisdk::check_ai_error(result);

m1b
Community Expert
Community Expert
July 22, 2024

Ah, I'm afraid I don't know anything about the SDK. @Dirk Becker maybe you can help?

Legend
July 22, 2024

AFAIK the SDK has one example to send a message as single string argument, back and forth between ExtendScript and a plug-in.

I gave up on that approach and load my first and only AIP as ExtendScript ExternalObject (different SDK – provided with Bridge and ESTK). Passing native objects to EO is again tricky beyond documentation, so I work on a (very limited) shadow DOM for my purposes.

I do not use CEP, but I think their preferred way is another step of message passing.

CarlosCanto
Community Expert
Community Expert
July 13, 2024

What do you mean by Artwork dictionary?

 

there is a Spelling Dictionary, is that what you're referring to?