IExtensionConfig Interface

Provides access to members that describe an extension.

When To Use

If you want your extension to be exposed in the Extensions dialog, you would also implement the IExtensionConfig interface. The class module for your extension would implement both IExtension and IExtensionConfig.

Members

Name Description
Read-only property Description Detailed description of the extension.
Read-only property ProductName Name of the extension.
Read/write property State The state of the extension.

IExtensionConfig.Description Property

Detailed description of the extension.

Public ReadOnly Property Description As String
public string Description {get;}

Remarks

Descriptionis the text that is displayed for this extension in the About this extension box in the Extensions dialog.

IExtensionConfig.ProductName Property

Name of the extension.

Public ReadOnly Property ProductName As String
public string ProductName {get;}

Remarks

ProductNameis the name that is displayed for this extension in the Extensions dialog.

IExtensionConfig.State Property

The state of the extension.

Public Property State As esriExtensionState
public esriExtensionState State {get; set;}

Remarks

The esriExtensionStateenumeration is used with this property to specify whether the extension is enabled, disabled, or unavailable. When the state is enabled, the extension is checked in the Extensions dialog. The checked state of the extension is saved in the user settings in the registry.

If the extension is terminated prematurely (for example, from interrupting a debugging session) the State will be set to 0.

Classes that implement IExtensionConfig

Classes Description
DddServerEnvironment (esriGeoDatabase) 3D Server Environment (license) singleton object.

Remarks

The Extensions dialog in the ArcGIS applications allows users to turn extensions on and off. The IExtensionConfig interface is used to provide the Extension dialog with the name of the extension, a description of the extension, and specifies the state of the extension.

The esriExtensionState enumeration is used to specify whether the extension is enabled, disabled, or unavailable. The state of the extensions is user based. When an extension is installed, its default state is unchecked (esriESDisabled) and the user must knowingly check the extension on in the Extensions dialog box.

With a custom extension, you have full control over what happens when your extension is turned on or off. However, it is a good idea to follow the same design as the ArcGIS extensions. The following notes explain how the ArcGIS extensions work when they are turned on or off in the Extensions dialog.

When a user checks one of the ArcGIS extensions in the Extensions dialog box, the follow things occur:

  • The checked state of the extension is saved to the user settings in the registry. (This occurs automatically by the application so it is not something a developer needs to do.)
  • The extension requests a license from the license manager.
  • If a license is available, the tools are enabled on the toolbar delivered by the extension.
  • If a license is not available, the tools are disabled on the toolbar delivered by the extension. Also, text stating that the license in not available is displayed to the right of the extension name in the Extensions dialog box.

When a user unchecks one of the ArcGIS extensions in the Extensions dialog box, the follow things occur:

  • The extension verifies that it is not being used within that application.

    • If the extension is being used within the application, the extension does not allow itself to be unchecked and a warning message is given.
    • If the extension is not being used within the application, the uncheck completes successfully and the remaining steps occur.
  • The unchecked state for the extension is saved in the user settings in the registry. (This occurs automatically by the application so it is not something a developer needs to do.)

  • If the toolbar for the extension is active, the appropriate tools are disabled.

  • The Extension lets the license manager know it is no longer using the extension license within the application and the license manager releases the license for that extension.

The IExtensionConfig interface is independent of ESRI's licensing approach so as a developer you can incorporate a custom licensing solution. Alternatively, if your extension doesn't work with a license manager, then you don't have to worry about requesting and releasing a license. You could implement IExtensionConfig simply to enable and disable the tools on your extension's toolbar accordingly.

The example code below enables the ArcGIS Spatial Analyst extension.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.