ERROR

License not available on AddExtension method

Last Published: April 25, 2020

Error Message

When you invoke method calls on ESRI extension products from a stand-alone application, the methods fail with "license not available", even when you have a valid extension license.

Cause

Within VBA, you can supply a "0" as an argument to AddExtension:
pExtAdmin.AddExtension pUid, 0
From a stand-alone application, however, 0 is an invalid value.

Solution or Workaround



Substitute a variant for the "0" that is passed as the second parameter to the AddExtension method.

Code:
Dim pUid As UID
Set pUid = New UID
pUid.Value = "esriCore.SAExtension"

Dim pExtAdmin As IExtensionManagerAdmin
Set pExtAdmin = New ExtensionManager

Dim var As Variant
pExtAdmin.AddExtension pUid, var

Article ID:000004539

Software:
  • ArcMap 8 x

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic