• 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 save illustrator document properly in C++ plugin

Explorer ,
Nov 09, 2024 Nov 09, 2024

Copy link to clipboard

Copied

I'm learning the AI C++ SDK and trying to create a plugin. The plugin mainly funciton is :

1. open document using "SnpDocumentHelper::OpenDocument"

2. make some changes with find and replace like "SnpText::FindAndReplace"
3. Save document with "SnpDocumentHelper::SaveDocument"

4. close documetn with "SnpDocumentHelper::CloseDocument"

5. repeat 1-5

 

Currect situation is that if we only do step 1 and step 2, everything is expected, those documents were opened and find replace worked as well, then if I close those opened documents, it will ask for save.

 

The problem is that, if we add step3 and step4, the document change won't be saved. Even just added step3 without step4, the changes are also disappeared.
We have no idea why it hebavies like this. Mabe the change status was notified later than saving document in code?

So, the question is how to save a changed document using C++ API properly? 

 

TOPICS
SDK , Third party plugins

Views

63

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
Adobe
Explorer ,
Nov 09, 2024 Nov 09, 2024

Copy link to clipboard

Copied

LATEST

A bit more about "The problem is that, if we add step3 and step4, the document change won't be saved. Even just added step3 without step4, the changes are also disappeared.", it didn't crash, if adding step3&4, the documents will be closed successfully, with no content change. If only add step3, the documents keep open but no changes at all. 

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