AnsweredAssumed Answered

AddTableView Broken Link

Question asked by retiredmofo65 on Jun 13, 2016
Latest reply on Jun 14, 2016 by retiredmofo65

Hi,

I'm having trouble adding a table to an .mxd using Python. The script adds the table, but it has a broken link. I can fix it by setting the data source manually. Any Ideas? Here is my script:

import arcpy

mxd = arcpy.mapping.MapDocument(r'\\swf-netapp1\RefGIS\FY

15_FLD_Support\Geospatial\Automation_Tools\LM_Test.mxd')

df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]

flyxsection_tbl = arcpy.mapping.TableView(r'\\swf-netapp1\RefGIS\FY-15_FLD_Support\Geospatial\Automation_Tools\Daily_Lake_Map.gdb\flyxsection')

arcpy.mapping.arcpy.AddTableView(df, flyxsection_tbl)

mxd.save()

del mxd, flyxsection_tbl

print ' Script Complete'

 

Thanks,

Jeff

Outcomes