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

Art Dictionary entries are not persistant

Community Beginner ,
Mar 27, 2017 Mar 27, 2017

Copy link to clipboard

Copied

Hi,

I'm trying to set string dictionary entry for art. It is setting the entry but, it will be lost if I close the document and reopen again.

As per my understanding dictionary entries are persistant across sessions. Am I doing anything wrong?

This is code I'm using..

  .

  .

  .

  AIDictionaryRef artDictRef = NULL;

  sAIArt->GetDictionary(textFrameArt,&artDictRef); //I've proper art handle

  sAIDictionary->SetStringEntry(artDictRef,AIDictKey("myKey"),"String value");A. PattersonToto RoToTO

  .

  .

  .

TOPICS
SDK

Views

474

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 Beginner , Mar 30, 2017 Mar 30, 2017

Changing code like this worked for me.

AIDictKey key = sAIDictionary->Key("keyName");

sAIDictionary->SetStringEntry(artDictRef,key,"value");

I guess inline key entry creation was problem.

Votes

Translate

Translate
Adobe
Guide ,
Mar 28, 2017 Mar 28, 2017

Copy link to clipboard

Copied

On the face of it, that looks correct to me. The only think I can think of is: how does this code get executed? I.e. when it gets run, what is it in response to? Depending on what you're responding to, you may need an application context.

Also, you should check the error results from both calls. One of them may shed some light.

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
Community Beginner ,
Mar 30, 2017 Mar 30, 2017

Copy link to clipboard

Copied

Changing code like this worked for me.

AIDictKey key = sAIDictionary->Key("keyName");

sAIDictionary->SetStringEntry(artDictRef,key,"value");

I guess inline key entry creation was problem.

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
Advocate ,
Mar 31, 2017 Mar 31, 2017

Copy link to clipboard

Copied

LATEST

Inline key creation would be:

sAIDictionary->SetStringEntry(artDictRef,sAIDictionary->Key("myKey"),"String value");

Your previous code:

sAIDictionary->SetStringEntry(artDictRef,AIDictKey("myKey"),"String value");

Is just casting a char pointer to an AIDictKey which is why it didn't work.

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