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

How To Handle Image Link Failed Dialog Buttons(Replace & Ignore) On File Open Process

Community Beginner ,
Jun 26, 2019 Jun 26, 2019

Copy link to clipboard

Copied

Dear Friends,

     

     We have try to handle Adobe Illustrator Image Link failed message button on file open process. .         

              

     We need to handle Replace and Ignore button click process with my new plugin.

     So We try to handle this button process with using as kAIFileFormatLinkUpdateNotifier,

     But it give notify on after complete Replace and Ignore button click process and also does not possible to handle this button click process.

     We need to handle that Replace button process on before open Replace dialog.

Coding

//=============================================

ASErr SamplePlugin::AddNotifiers(SPInterfaceMessage* message)

{

     AIErr error = kNoErr;

     error = sAINotifier->AddNotifier(message->d.self,kAIFileFormatLinkUpdateNotifier, kAIFileFormatLinkUpdateNotifier, &fFileLinkNotifierHandle);

     if (error) { return error; }

     return error;

}

//============================================================

ASErr SamplePlugin::Notify(AINotifierMessage *message)

{

     if (message->notifier == fFileLinkNotifierHandle)

     {

          AILinkUpdateNotifyData* lnkNotifyData = NULL;

          lnkNotifyData = (AILinkUpdateNotifyData*)message->notifyData;

          if (lnkNotifyData != NULL)

          {

               if (lnkNotifyData->m_iUpdateType == eLinkUpdateType::kLinkReplaced)

               {

                    sAIUser->MessageAlert(ai::UnicodeString("Replace"));

               }

               else if (lnkNotifyData->m_iUpdateType == eLinkUpdateType::kMissingLinkIgnored)

               {

                    sAIUser->MessageAlert(ai::UnicodeString("Ignore"));

               }

               else if (lnkNotifyData->m_iUpdateType == eLinkUpdateType::kNormalUpdate)

               {

                    sAIUser->MessageAlert(ai::UnicodeString("Normal"));

               }

          }

     }

     return kNoErr;

}

//========================================================

     If we have make any mistake on above coding and process please explain it.

     Is there any other option to handle this button process please guide me for solve this problem.

With Regards,

   Vicky.

TOPICS
SDK

Views

415

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
no replies

Have something to add?

Join the conversation
Adobe