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?
PDM add-in saving shared settings
-
- Posts: 2
- Joined: Thu May 13, 2021 12:43 pm
-
- Posts: 2
- Joined: Thu May 13, 2021 12:43 pm
Re: PDM add-in saving shared settings
I found IEdmDictionary5 Interface is what I needed. https://help.solidworks.com/2021/Englis ... nary5.html
Re: PDM add-in saving shared settings
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
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