CheckProduct
Resumen
Checks to see if the requested license is available.
Sintaxis
CheckProduct(product)
| El parámetro | Explicación | Tipo de datos |
|---|---|---|
|
product |
Product code for the product being checked.
|
String |
Valor de retorno
| Tipo de datos | Explicación |
|---|---|
|
String |
There are five possible return values for
|
Muestra de código
Check to see if an ArcGIS Desktop Advanced license is available.
import sys
import arcpy
arcpy.env.workspace = "c:/data/world.gdb"
if arcpy.CheckProduct("ArcInfo") == "Available":
arcpy.management.PolygonToLine("Lakes", "LakeLines")
else:
msg = 'ArcGIS for Desktop Advanced license not available'
print(msg)
sys.exit(msg)