ArcObjects Library Reference (System)  

IExtensionConfig Interface

Provides access to members that describe an extension.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

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

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.

CoClasses that implement IExtensionConfig

CoClasses and Classes Description
ArcPressExtension (esriOutputExtensions) Class that controls the ArcPress Extension.
DddEnvironment (esri3DAnalystUI) 3D Environment singleton object.
DddServerEnvironment (esriGeoDatabase) 3D Server Environment (license) singleton object.
FMEExtension (esriDataInteropUI) FMEExtension Class
FMEExtensionHelper (esriDataInterop) FMEExtensionHelper Class
MAExtension (esriDefenseSolutions) Provides information about MAExtension.
MaplexExtension (esriMaplexUI) Represents the Maplex Extension.
NetworkAnalystExtension (esriNetworkAnalystUI) The extension for network analysis.
Publisher (esriPublisherUI) The Publisher Extension coclass.
SAExtension (esriSpatialAnalystUI) Spatial Analyst Extension Object.
SchematicExtension (esriSchematicUI) Provides access to the schematic extension.
TAExtension (esriTrackingAnalystUI) Defines the coclass for the TAExtension implementation.

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:

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

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.

[Visual Basic .NET]

The example code below enables the ArcGIS Spatial Analyst extension.

Sub EnableExtension()
  Dim pUID As New UID
  pUID.Value = “{3C5059FE-9F15-401A-94ED-EED914D73E3E}” ‘ Spatial Analyst  
  Dim pExtConfig As IExtensionConfig
  Set pExtConfig = Application.FindExtensionByCLSID(pUID)

  If Not pExtConfig Is Nothing Then
    If (Not pExtConfig.State = esriESUnavailable) Then
      pExtConfig.State = esriESEnabled
    Else
      MsgBox “No licenses available”
    End If
  Else
    MsgBox “Extension is not installed”
  End If
End Sub

See Also

IExtension Interface

.NET Snippets

Display Extension State on Status Bar