Provides access to members that describe an extension.
Product Availability
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 | ||
---|---|---|
Description | Detailed description of the extension. | |
ProductName | Name of the extension. | |
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:
- 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.
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