Skip to main content
Known Participant
Jul 11, 2024 11:25 AM UTC
Question

How do we access the AI Dictionary using ExtendScript

Hi Folks,

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

Thanks in advance

This topic is closed to new replies. Start a new post to keep the conversation going.

5 replies

Participant
Jul 22, 2024 4:42 AM UTC

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);
} 

Translate
m1b
Community Expert
Community Expert
Jul 22, 2024 4:58 AM UTC

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

Translate
Legend
Jul 22, 2024 5:14 PM UTC

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.

Translate
CarlosCanto
Community Expert
Community Expert
Jul 13, 2024 8:36 PM UTC

What do you mean by Artwork dictionary?

 

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

 

 

Translate