PDM add-in saving shared settings

Programming and macros
dyslexicDavey
Posts: 2
Joined: Thu May 13, 2021 12:43 pm
Answers: 0

PDM add-in saving shared settings

Unread post by dyslexicDavey »

I have a PDM add-in and know how to use EdmMenu_Administration to make an admin view. I have made settings and can save them but only for each user. I can't work out how to save data that is shared between the other PDM admin users. Does anyone know how data like this is stored?

Using Dispatch as an example, I can add, edit, and remove an action and we all see it right away. I would think this is saved in PDM somehow but don't see how that would be done. Any Ideas?
dyslexicDavey
Posts: 2
Joined: Thu May 13, 2021 12:43 pm
Answers: 0

Re: PDM add-in saving shared settings

Unread post by dyslexicDavey »

I found IEdmDictionary5 Interface is what I needed. https://help.solidworks.com/2021/Englis ... nary5.html
AmenJlili
Posts: 8
Joined: Thu Nov 30, 2023 5:17 pm
Answers: 0
x 6

Re: PDM add-in saving shared settings

Unread post by AmenJlili »

Yea. Use a dictionary.

Some thoughtful ideas from a seasoned developer.

- Save your settings or options data to a dictionary.
- Make sure the dictionary name is unique. I'd use the add-in name.
- Control who can use EdmMenu_Administration to ensure only users with EditAddIns permission can access that menu.
- Put all settings in one class as properties. Please make sure they are public.
- Use the PropertyEditor control to display the class in an editable UI.
- Use JSON serialization and deserialization to save changes to the dictionary.


Amen,
Blue Byte Systems Inc.
cadoverflow.com
Post Reply