ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Hilfe
  • Sign Out
ArcGIS Desktop

ArcGIS Online

Die Mapping-Plattform für Ihre Organisation

ArcGIS Desktop

Ein vollständiges professionelles GIS

ArcGIS Enterprise

GIS in Ihrem Unternehmen

ArcGIS Developers

Werkzeuge zum Erstellen standortbezogener Apps

ArcGIS Solutions

Kostenlose Karten- und App-Vorlagen für Ihre Branche

ArcGIS Marketplace

Rufen Sie Apps und Daten für Ihre Organisation ab.

  • Dokumentation
  • Support
Esri
  • Anmelden
user
  • Eigenes Profil
  • Abmelden

ArcMap

  • Startseite
  • Erste Schritte
  • Karte
  • Analysieren
  • Verwalten von Daten
  • Werkzeuge
  • Erweiterungen

RefreshTOC

  • Zusammenfassung
  • Auswertung
  • Syntax
  • Codebeispiel

Zusammenfassung

Refreshes the table of contents.

Auswertung

If Python is used to modify the table of contents within the current map document (e.g., change a layer name), the map will not automatically update with the changes. RefreshTOC is only needed if you want to see the table of contents updated.

Syntax

RefreshTOC ()

Codebeispiel

RefreshTOC example

A simple script run from the Python window that demonstrates how to update the Table of Contents and force a refresh to make the change visible.

import arcpy

# Create a MapDocument object from the current map
mxd = arcpy.mapping.MapDocument("CURRENT")

# Update the layer name of the first layer in the Table of Contents
arcpy.mapping.ListLayers(mxd)[0].name = "New Layer Name"

# Refresh the Table of Contents to reflect the change
arcpy.RefreshTOC()

del mxd

ArcGIS Desktop

  • Startseite
  • Dokumentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

Über Esri

  • Über uns
  • Karriere
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Wir sind an Ihrer Meinung interessiert.
Copyright © 2021 Esri. | Datenschutz | Rechtliches