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 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

IsSynchronous

  • Résumé
  • Syntaxe
  • Exemple de code

Résumé

Determines if a tool is running synchronous or asynchronous. When a tool is synchronous, the results are automatically returned, but no other action may be taken until the tool has completed. All non-server tools are synchronous. Server tools may be asynchronous, meaning that once the tool has been submitted to the server, other functionality can be run without waiting, and the results must be explicitly requested from the server.

Syntaxe

IsSynchronous (tool_name)
ParamètreExplicationType de données
tool_name

The name of the tool to determine if it is synchronous.

String

Valeur renvoyée

Type de donnéesExplication
Boolean

A return Boolean value of True indicates the tool is synchronous.

Exemple de code

IsSynchronous example

Determine if a server tool is running synchronous.

import time
import arcpy

# Add server toolbox from a local ArcGIS Server
arcpy.ImportToolbox("pondermatic;buffertools")

# Create and load a recordset object for the tool's input
record_set = arcpy.RecordSet()
record_set.load("c:/temp/lines.shp")

# Run the server tool
results = arcpy.BufferLines_mytools(record_set, "100")

# If the tool is asynchronous, wait until the task is finished (status = 4)
if not arcpy.IsSynchronous("BufferLines"):
    while results.status < 4:
        time.sleep(0.1)

# Get output from task and export to a feature class on disk
result = results.getOutput(0)
result.save("c:/temp/bufferlines.shp")

Rubriques connexes

  • ListToolboxes
  • ListTools
  • Répertorier les outils, les boîtes à outils et les paramètres d’environnement

ArcGIS Desktop

  • Accueil
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • 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 © 2021 Esri. | Confidentialité | Légal