CheckProduct
汇总
检查申请的许可是否可用。
语法
CheckProduct(product)
| 参数 | 说明 | 数据类型 |
|---|---|---|
|
product |
Product code for the product being checked.
|
String |
返回值
| 数据类型 | 说明 |
|---|---|
|
String |
|
代码示例
CheckProduct 示例
检查是否可以使用 ArcGIS Desktop Advanced 许可。
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)