CheckProduct

Diese ArcGIS 2.8-Dokumentation wurde archiviert und wird nicht mehr aktualisiert. Inhalt und Links sind möglicherweise veraltet. Verwenden Sie die aktuelle Dokumentation.

Zusammenfassung

Checks to see if the requested license is available.

Syntax

CheckProduct (product)
ParameterErläuterungDatentyp
product

Product code for the product being checked.

  • arcviewArcGIS Desktop Basic product code
  • arceditorArcGIS Desktop Standard product code
  • arcinfoArcGIS Desktop Advanced product code
  • engineEngine Runtime product code
  • enginegeodbEngine Geodatabase Update product code
  • arcserver Server product code
String
Rückgabewert
DatentypErläuterung
String

There are five possible return values for CheckProduct:

  • AlreadyInitialized License has already been set in the script.
  • Available The requested license is available to be set.
  • Unavailable The requested license is unavailable to be set.
  • NotLicensed The requested license is not valid.
  • Failed A system failure occurred during the request.

Codebeispiel

CheckProduct example

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.PolygonToLine_management("Lakes", "LakeLines")
else:
    msg = 'ArcGIS for Desktop Advanced license not available'
    print(msg)
    sys.exit(msg)

Verwandte Themen