SetProduct (arcpy)

Zusammenfassung

The SetProduct function defines the desktop license. SetProduct returns information on the license.

VeraltetVeraltet:

The product level should be set by importing the appropriate product module (arcinfo, arceditor, arcview, arcserver, arcenginegeodb, or arcengine) prior to importing arcpy. The SetProduct function is a legacy function and cannot set the product once arcpy has been imported.

For scripts using the arcgisscripting module, the equivalent SetProduct method is still supported.

Diskussion

TippTipp:

Die Einstellung des Produkts und der Erweiterungen ist nur innerhalb eigenständiger Skripte erforderlich. Wenn Sie Werkzeuge im Python-Fenster ausführen oder Skriptwerkzeuge verwenden, wird das Produkt bereits in der Anwendung festgelegt, und die aktiven Erweiterungen basieren auf dem Dialogfeld "Erweiterungen".

Syntax

SetProduct (product)
ParameterErläuterungDatentyp
product

Product code for the product being set.

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

The function returns the status on the product license. There are four possible values:

  • CheckedOutLicense successfully set.
  • AlreadyInitializedLicense has already been set.
  • NotLicensedThe license is not valid or available.
  • FailedA system failure occurred during the set request.

Codebeispiel

SetProduct example

Sets an ArcGIS for Desktop Basic product license using the arcview module.

# Set the ArcGIS for Desktop Basic product by importing the arcview module.
#
import arcview
import arcpy

arcpy.env.workspace = "C:/Data/SanDiego.gdb"

arcpy.CreateRasterDataset_management(arcpy.env.workspace,
      "LandUse", "30", "8_BIT_UNSIGNED", "Freeways", 1)

Verwandte Themen

9/11/2013