Addin - Settings

NachitoMax
Advisor
Advisor

Addin - Settings

NachitoMax
Advisor
Advisor

Hey

 

What does everyone use to save settings? I thought about a database but i dont want to introduce MS Access because of the support files and a decent database requires some sort of SQL server. Seeing as a class project doesnt use the Project Settings, i was wondering what other people use and if possible, a code snippet to help me out?

 

Appreciate any help guys

 

 

Thanks

 

Nacho
Automation & Design Engineer

Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC

EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


0 Likes
Reply
382 Views
3 Replies
Replies (3)

pball
Advisor
Advisor

I didn't end up using it because I couldn't figure out how to reorganize addin icons on the ribbon bar dynamically, but there is a built in settings in .Net. That is if you want local per PC settings.

 

https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/objects/my-settings-object

 

I also use an XML file for saving notes that can be inserted into drawings. The XML file is stored on the network so every user has access to it. There are loads of examples for reading/writing XML files out there.

0 Likes

NachitoMax
Advisor
Advisor

Hi

 

you cant use these settings on a class project, only a standalone project. i'll have a look at xml, i might need to encrypt the strings to keep it moderately secure

 

 

Thanks

 

Nacho
Automation & Design Engineer

Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC

EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


0 Likes

basnederveen
Advocate
Advocate

@NachitoMax 

 

I'm using exactly these settings, bounded to controls in a form, in an add-in, and they work fine. In the same inventor session and also throughout sessions.

 

You just have to call My.Settings.Save on closing.

0 Likes