ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Aide
  • Sign Out
ArcGIS Desktop

ArcGIS Online

La plateforme cartographique de votre organisation

ArcGIS Desktop

Un SIG professionnel complet

ArcGIS Enterprise

SIG dans votre entreprise

ArcGIS for Developers

Outils de création d'applications de localisation

ArcGIS Solutions

Modèles d'applications et de cartes gratuits pour votre secteur d'activité

ArcGIS Marketplace

Téléchargez des applications et des données pour votre organisation.

  • Documentation
  • Support
Esri
  • Se connecter
user
  • Mon profil
  • Déconnexion

ArcMap

  • Accueil
  • Commencer
  • Carte
  • Analyser
  • Gérer les données
  • Outils
  • Extensions

CheckOutExtension

  • Résumé
  • Discussion
  • Syntaxe
  • Exemple de code

Résumé

Retrieves the license from the License Manager.

Once the extension license has been retrieved by the script, tools using that extension can be used. Once a script is finished with an extension's tools, the CheckInExtension function should be used to return the license to the License Manager so other applications can use it. All checked-out extension licenses and set product licenses are returned to the License Manager when a script completes.

Discussion

Astuce:

La définition du produit et des extensions est uniquement nécessaire dans les scripts autonomes. Si vous exécutez des outils à partir de la fenêtre Python ou à l'aide d'outils de script, le produit est déjà défini à partir de l'application et les extensions actives sont basées sur la boîte de dialogue Extensions.

Syntaxe

CheckOutExtension (extension_code)
ParamètreExplicationType de données
extension_code

Keyword for the extension product that is being checked.

  • 3D —Extension ArcGIS 3D Analyst
  • Aeronautical —ArcGIS for Aviation: Charting
  • Airports —ArcGIS for Aviation: Airports
  • ArcScan —ArcScan
  • Bathymetry —ArcGIS for Maritime: Bathymetry
  • Business —ArcGIS Business Analyst
  • DataReviewer —ArcGIS Data Reviewer for Desktop
  • DataInteroperability —Extension ArcGIS Data Interoperability for Desktop
  • Defense —Esri Defense Solution
  • Foundation —Esri Production Mapping
  • GeoStats —Extension ArcGIS Geostatistical Analyst
  • Highways —Esri Roads and Highways
  • JTX —ArcGIS Workflow Manager for Desktop
  • LocationReferencing —ArcGIS Pipeline Referencing
  • Nautical —ArcGIS for Maritime: Charting
  • Network —Extension ArcGIS Network Analyst
  • Schematics —Extension ArcGIS Schematics
  • Spatial —Extension ArcGIS Spatial Analyst
  • StreetMap —StreetMap Premium for ArcGIS
  • Tracking —Extension ArcGIS Tracking Analyst
  • Licensing and extensions
String

Valeur renvoyée

Type de donnéesExplication
String

There are three possible returned values for CheckOutExtension:

  • NotInitialized —No desktop license has been set.
  • Unavailable —The requested license is unavailable to be set.
  • CheckedOut —The license has been set successfully.

Exemple de code

CheckOutExtension example

Check out 3D extension for use by tools.

import arcpy

class LicenseError(Exception):
    pass

try:
    if arcpy.CheckExtension("3D") == "Available":
        arcpy.CheckOutExtension("3D")
    else:
        # raise a custom exception
        raise LicenseError

    arcpy.env.workspace = "c:/GrosMorne"
    arcpy.HillShade_3d("WesternBrook", "wbrook_hill", 300)
    arcpy.Aspect_3d("WesternBrook", "wbrook_aspect")
    arcpy.CheckInExtension("3D")

except LicenseError:
    print("3D Analyst license is unavailable")
except arcpy.ExecuteError:
    print(arcpy.GetMessages(2))

Rubriques connexes

  • CheckExtension
  • CheckInExtension
  • Accès aux licences et aux extensions dans Python
  • Vue d'ensemble des extensions d'ArcGIS

ArcGIS Desktop

  • Accueil
  • Documentation
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

A propos d'Esri

  • A propos de la société
  • Carrières
  • Blog d’Esri
  • Conférence des utilisateurs
  • Sommet des développeurs
Esri
Donnez-nous votre avis.
Copyright © 2019 Esri. | Confidentialité | Légal