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:
mxd = arcpy.mapping.MapDocument(r'\\swf-netapp1\RefGIS\FY
df = arcpy.mapping.ListDataFrames(mxd, "Layers")
flyxsection_tbl = arcpy.mapping.TableView(r'\\swf-netapp1\RefGIS\FY-15_FLD_Support\Geospatial\Automation_Tools\Daily_Lake_Map.gdb\flyxsection')
del mxd, flyxsection_tbl
print ' Script Complete'
Thanks for the reply. I'm am using the example from ESRI. I'm using Pyscripter. I'm automating a update of an .mxd, so I need to do the work from the outside. I'm going to be joining the table next and doing field calcs to update a feature class with daily lake level numbers. My goal is to not have to open the .mxd at all. I'm not sure why it works but the link is broken... Anyhow, thanks again.