Copy link to clipboard
Copied
Hi Folks,
How to store and retrieve the ArtWork dictionary data using extendscript in Adobe CEP Panel.
Thanks in advance
Copy link to clipboard
Copied
What do you mean by Artwork dictionary?
there is a Spelling Dictionary, is that what you're referring to?
Copy link to clipboard
Copied
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);
}
Copy link to clipboard
Copied
Ah, I'm afraid I don't know anything about the SDK. @Dirk Becker maybe you can help?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
I don't even know whether that dictionary is the same thing already exposed to ES as preferences. Hmm, document has no prefs, so maybe "document.tags"? Pure speculation.