ScriptInterfaceManager

The ScriptInterfaceManager object controls the link between addon scripts and the user interface. It allows scripts to create, retrieve, and remove forms and ribbon pages, as well as display messages to the user.

For every addon that is loaded for a form, a new scripting environment is created internally. A major component of that scripting environment is the ScriptInterfaceManager object, which controls the link between addon scripts and the user interface. Everything that is visible to the user is managed by the ScriptInterfaceManager either directly or via child objects that are managed by the ScriptInterfaceManager. For example, all form elements are created and managed using FormInterface objects, all of which are directly managed by the ScriptInterfaceManager. Addons can obtain a reference to the ScriptInterfaceManager by calling the GetInterfaceManager global method.

Properties

None

Methods

CreateBrowser(string browserName, string ribbonPageName, string categoryName)

Creates a BrowserInterface object and prepares it to be displayed on the current form.

Parameter Direction

Parameter Name

Parameter Description

Input

browserName

The name of the new browser, which is also used as the text for the browser tab

Input

ribbonPageName

The name to use for the page the browser's buttons will be placed on.

Input

categoryName

The name to use for the page category containing the browser's ribbon page

Output

BrowserInterface


The CreateBrowser method returns a BrowserInterface object which is considered to be obsolete.  Instead, use the CreateForm method to create a FormInterface object and use that to create a Browser control.

CreateForm(string formName, string category)

Creates a new FormInterface object that can be used to display form controls such as browsers, text editors, etc.

Parameter Direction

Parameter Name

Parameter Description

Input

formName

The name of the form to create.  This value is used when attempting to retrieve the form using the GetForm method.

Output

FormInterface


CreateRibbonPage(string name)

Creates a ScriptRibbonPage object and adds the ribbon page to the current form.

Parameter Direction

Parameter Name

Parameter Description

Input

name

The name of the ribbon page to create.

Output

ScriptRibbonPage


GetBrowser(string browserName)

Returns the previously created BrowserInterface whose name matches the browser name provided.

Parameter Direction

Parameter Name

Parameter Description

Input

browserName

The name of the browser to retrieve

Output

BrowserInterface


GetForm(string formName)

Retrieves the FormInterface object specified by formName.

Parameter Direction

Parameter Name

Parameter Description

Input

formName

The name of the form to retrieve

Output

FormInterface


GetRibbonPage(string pageName)

Returns the previously created ScriptRibbonPage whose name matches the page name provided.

Parameter Direction

Parameter Name

Parameter Description

Input

pageName

The name of the ribbon page to retrieve

Output

ScriptRibbonPage


RemoveBrowser(BrowserInterface browser)

Removes the given BrowserInterface from the form and destroys it.

Parameter Direction

Parameter Name

Parameter Description

Input

browser

The BrowserInterface object that should be removed

It is NOT necessary to remove browsers as a cleanup process, as they are automatically removed when the current form is closed.

RemovePage(ScriptRibbonPage page)

Removes the given ScriptRibbonPage from the form and destroys it.

Parameter Direction

Parameter Name

Parameter Description

Input

page

The ScriptRibbonPage that should be removed

It is NOT necessary to remove script ribbon pages as a cleanup process, as they are automatically removed when the current form is closed.

ShowMessage(string Message, string title)

Displays a message box on the current form that will show the specified message as the primary text and the specified title in the title bar.

Parameter Direction

Parameter Name

Parameter Description

Input

message

The Message to be displayed in the message box

Input

title

The Text to be used as the title of the message box

UnloadInterface()

Removes all ribbon pages and browser interfaces that have been created by the current script.