RefreshCatalog

Resumen

Forces a refresh of the Catalog window or Catalog tree.

Debate

The Catalog window may not always display the latest state of all ArcGIS information. In these cases, it is useful to refresh your content. For instance, intermediate data created within a script tool, or using non-ESRI python modules to create or move data will not be automatically shown in the Catalog window.

Sintaxis

RefreshCatalog (dataset)
ParámetroExplicaciónTipo de datos
dataset

Data element to be refreshed.

String

Ejemplo de código

RefreshCatalog example

Forces a refresh after using shutil.copytree to copy a directory.

# Import arcpy and import Python's shutil module
import arcpy
import shutil

input = "c:\\data\\hydrology"
target = "c:\\test\\hydro_backup"

# Copy a directory tree to a backup location
shutil.copytree(input, target)

# Refresh the Catalog window for the new directory
arcpy.RefreshCatalog(target)

Temas relacionados


7/10/2012