CheckProduct (arcpy)
Zusammenfassung
Checks to see if the requested license is available.
Syntax
CheckProduct (product)
Parameter | Erläuterung | Datentyp |
product |
Product code for the product being checked.
| String |
Datentyp | Erläuterung |
String |
There are five possible return values for CheckProduct:
|
Codebeispiel
CheckProduct example
Check to see if an ArcGIS for Desktop Advanced license is available.
import arcpy
from arcpy import env
import sys
env.workspace = "C:/Data/World.gdb"
if arcpy.CheckProduct("ArcInfo") == "Available":
arcpy.PolygonToLine_management("Lakes", "LakeLines")
else:
print "ArcGIS for Desktop Advanced license not available"
sys.exit("ArcGIS for Desktop Advanced license not available")
Verwandte Themen
9/11/2013