Unfortunately the commands you suggested are not available in 10.0.
theTable = r'C:\Documents and Settings\jdk588\My Documents\ArcGIS\Default.gdb\MyTable' arcpy.MakeQueryTable_management(theTable, "TableNameinTOC", "NO_KEY_FIELD")
I'm trying to add a table to the table of contents from a arcpy script.
mxd = arcpy.mapping.MapDocument("Current") df = arcpy.mapping.ListDataFrames(mxd)[0] TableView = arcpy.mapping.TableView(r'C:\Documents and Settings\jdk588\My Documents\ArcGIS\Default.gdb\MyTable') arcpy.mapping.AddTableView(df, TableView)
mxd = arcpy.mapping.MapDocument("Current") df = arcpy.mapping.ListDataFrames(mxd)[0] try: TableView = arcpy.mapping.TableView(r'C:\Documents and Settings\jdk588\My Documents\ArcGIS\Default.gdb\MyTable') arcpy.mapping.AddTableView(df, TableView) pythonaddins.MessageBox("Table Added to TOC. Switch TOC to 'List By Source' view to access Table.", "Table Added", 0) except Exception as e: pythonaddins.Messagebox("An error occured: " + e.message, "ERROR", 0)
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.