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

To create multiple values in "basicpersistinterface" plug-in with UID.

Community Beginner ,
Mar 20, 2023 Mar 20, 2023

Copy link to clipboard

Copied

The "basicpersistinterface" plug-in in InDesign SDK only lets you enter a single value. I want to enter multiple values to create multiple document based persistent objects and each value should have a unique ID (UID). Is there a way to achieve this? 

TOPICS
How to , SDK

Views

181

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 Expert ,
Mar 20, 2023 Mar 20, 2023

Copy link to clipboard

Copied

If you have to add multiple value add more members to the persistent interface defintion and readwrite it. See an example of that in PersistentList sample where they persist a widestring and integer in the persistent interface. The same change would also be required in the non persistent version. Hope this helps

Also regarding UID, we are saving inside a boss class so the boss class would have the UID and that is unique. The interface would not have any meaning outside the boss class. Like if the value is saved on a pageitem then the pageitem has a UID generated for it.

-Manan

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 21, 2023 Mar 21, 2023

Copy link to clipboard

Copied

I am not able to return multiple persistent members that I added to the persistent interface definition in the Get() method. How can I return them?

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 Expert ,
Mar 23, 2023 Mar 23, 2023

Copy link to clipboard

Copied

LATEST

You should have multiple get method, one for each member you add to the interface. If you could provide some code snippets to show where exactly you are stuck we may be able to help better.

-Manan

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