EditorialSystemUserOptions Class

Build 1501 on 14/Nov/2017  This topic last edited on: 4/Feb/2014, at 09:26

The EditorialSystemUserOptions object manages the additional personal preferences in scripting, created as persistent variables in TedOptions.vb and available in all add-in files. Through the following read only property:

  Protected Overloads ReadOnly Property SystemUserOptions() As EditorialSystemUserOptions

    Get

      Return DirectCast(WinUI.ApplicationBase.Current.SystemUserOptions, EditorialSystemUserOptions)

    End Get

  End Property

you can call it as:

<variable> = SystemUserOptions.<preference>

An example:

m_File1.Text = SystemUserOptions.ADS_File1

Define new persistent variable in TedOptions.vb

1.Open the add-in solution in VBExpress and then open TedOptions.VB.

2.Locate the following code:

<XmlRoot("EditorialSystemUserOptions")> _

Public Class EditorialSystemUserOptions

  Inherits ShellSystemUserOptions

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.