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

AddTableView

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

Résumé

Provides the ability to add a table to a data frame within a map document (.mxd).

Discussion

AddTableView provides a way to add a table into a map document. A reference to a TableView object must exist first. It can be a reference to a table in another map document by using the ListTableViews function, or it can be a reference to a table in a workspace by using the TableView function.

Syntaxe

AddTableView (data_frame, add_table)
ParamètreExplicationType de données
data_frame

A reference to a DataFrame object within a map document.

DataFrame
add_table

A reference to a TableView object representing the table to be added. This reference can point to a table within an existing map document or it can reference a table in a workspace via the TableView function.

TableView

Exemple de code

AddTableView example

The following script will add three tables from three different workspaces to a single data frame in a map document. The different workspaces are shapefile/dBASE, file geodatabase, and SDE.

import arcpy
mxd = arcpy.mapping.MapDocument(r"C:\Project\Project.mxd")
df = arcpy.mapping.ListDataFrames(mxd, "New Data Frame")[0]
dbf_Table = arcpy.mapping.TableView(r"C:\Project\Data\customers.dbf")
fGDB_Table = arcpy.mapping.TableView(r"C:\Project\Data\fGBD.gdb\customers")
SDE_Table = arcpy.mapping.TableView(r"C:\PathToSDEConnectionfile.sde\customers")
arcpy.mapping.AddTableView(df, dbf_Table)
arcpy.mapping.AddTableView(df, fGDB_Table)
arcpy.mapping.AddTableView(df, SDE_Table)
mxd.saveACopy(r"C:\Project\Project2.mxd")
del mxd

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