The ShellSystemUserOptions object manages the additional personal preferences in scripting, created as persistent variables in SHELL.vb. Through the following read only property:
Public Shared ReadOnly Property Options As ShellSystemUserOptions
Get
Return DirectCast(WinUI.ApplicationBase.Current.SystemUserOptions, ShellSystemUserOptions)
End Get
End Property
you can call it as:
<variable> = Options.<preference>
or, in original syntax:
<variable> = ShellSystemUserOptions.<preference>
An example:
If ShellSystemUserOptions.PLN_LastPublication > 0 Then
Define new persistent variable in Shell.vb
1.Open the add-in solution in VBExpress and then open Shell.VB.
2.Locate the following code:
<XmlRoot("ShellSystemUserOptions")> _
Public Class ShellSystemUserOptions
Inherits SystemUserOptions
3.On the appropriate position below it, add a new line such as:
4.<XmlAttribute()> Public <variablename> As <variabletype> = <defaultvalue>
where:
o<variablename> is an unique name for the persistent variable,e.g. PLN_LastPublication or something similar. .
o<variabletype> is one of standard VB.NET types, as String, Boolean etc.
o<default value> is the default value for the variable, until user changes it.
You need to specify all of the above.