The EditorialCustomUserOptions object manages the additional personal preferences in scripting, created as persistent variables in CUSTOMTedOptions.vb and available in all custom add-in files. Through the following read only property:
Protected Overloads ReadOnly Property CustomUserOptions() As EditorialCustomUserOptions
Get
Return DirectCast(WinUI.ApplicationBase.Current.CustomUserOptions, EditorialCustomUserOptions)
End Get
End Property
you can call it as:
<variable> = CustomUserOptions.<preference>
An example:
m_File1.Text = CustomUserOptions.ADS_File1
Define new persistent variable in CustomTedOptions.vb
1.Open the add-in solution in VBExpress and then open TedOptions.VB.
2.Locate the following code:
<XmlRoot("SiteEditorialUserOptions")> _
Public Class EditorialCustomUserOptions
Inherits CustomUserOptions
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. FredCaptionHeight or something similar. You may want optionally to prefix the name with F_ if it is to be used on Fred4-specific main tabs, or with T_ if it applies on Ted4-specific main tabs.
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.