Plugin settings

Hi there,

has anybody an example of how to use the settings of an plugin? I’d like to store user preferences for some values.
But no idea when to set default values and how to overwrite and store new user data.

Yours

Dominik

Hi Dominik,

Is this helpful?

https://github.com/dalefugier/SampleCsCommands/blob/master/SampleCsPersistentSettings.cs

– Dale

Hi Dale,

thanks for teh reply! THis is exactly what I was looking for :slight_smile:

Yours

Dominik

Hi Dale,

what advantage has the PersisentSetting compared to a .NET settings file? How do I decide which one to use?

The PersisentSetting class is a quick, easy, and consistent way of storing persistent settings. And since PersisentSetting doesn’t store default values, the settings files are generally small and quick read and parse. But if you like using .NET settings files, then by all means continue to use them.

OK, thank you!

Hi Dale,
I’ve noticed that this url, and many others refering to samples in your personal github, are not acessible anymore. I know that this is an old topic, although that would still be an helpful file for me.
Could you please upload it again ?
NB : I didn’t find it in the RhinoCommon sample files.

1 Like