I do see this Pro SDK snippet which looks for the availability of extension to checkout and check-in. Is there a way to just check whether the extension is licensed/enabled or not ?
If an extension is licensed for you, it is available for you
CheckOutExtension—ArcPy Functions | Documentation
Use extensions—ArcGIS Pro | Documentation
If your organization has purchased extension licenses, and a license has been assigned to you, the tools and functionality associated with the extension are available automatically.
Unlike arcmap where you have to enable/disable and extension
May be my question was not so clear, I would like to validate whether the tool is licensed/assigned and show user a message that the tool requires an extension rather than showing an error halfway through the execution where the extension comes into picture and throws an error cannot run the tool without license.
import arcpy
checks = ['3D', 'Spatial', 'ImageAnalyst']
for c in checks:
print("{} ... {}".format(c, arcpy.CheckExtension(c)))
3D ... Available
Spatial ... Available
ImageAnalyst ... Available
Thanks for your response. I could not find a C# SDK alternative for CheckExtension method.
sample: ShowLicense
reference: topic8900.html - ArcGIS.Core.Licensing.LicenseInformation
Thanks Charles, I have tried IsAvailable method already and it does return true even after the "Licensed" checkbox is turned off using "Configure your Licensing Options" from Licensing tab.