Skip to main content
Participant
March 20, 2023
Question

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

  • March 20, 2023
  • 1 reply
  • 362 views

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? 

This topic has been closed for replies.

1 reply

Community Expert
March 21, 2023

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

-Manan
user2307Author
Participant
March 22, 2023

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?

Community Expert
March 24, 2023

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

-Manan