CheckProduct (arcpy)
摘要
检查申请的许可是否可用。
语法
CheckProduct (product)
参数 | 说明 | 数据类型 |
product |
Product code for the product being checked.
| String |
数据类型 | 说明 |
String |
CheckProduct 函数,有五个可能的返回值:
|
代码实例
CheckProduct 示例
检查是否存在 ArcGIS for Desktop Advanced 许可。
import sys
import arcpy
arcpy.env.workspace = "c:/data/world.gdb"
if arcpy.CheckProduct("ArcInfo") == "Available":
arcpy.PolygonToLine_management("Lakes", "LakeLines")
else:
msg = 'ArcGIS for Desktop Advanced license not available'
print(msg)
sys.exit(msg)
相关主题
5/10/2014