Select to view content in your preferred language

updating table in layout and exporting to pdf

517
2
09-30-2011 06:28 AM
RuiLopes
Emerging Contributor
Hi

We have automated the production of maps using python scripts that change the data sources path, using replaceWorkspaces method, and exports the map to a pdf, using ExportToPDF method with default parameters. The export uses the layout view that includes a map frame, title, legend and a table added using Add table to layout from the table view interface. Table columns are customised (column names, visible and formats) before adding it to the layout. All data is stored in a file geodatabase.

Problem 1 - after re-pointing the table data source to the new workspace, the table in the layout is not updated. The only way to get the table updated in the layout is getting the table in edit mode and stop editing after. The table view also loses the customization previously done.

Problem 2 - when the ExportToPDF function is used in a python script, the  table in the layout is not exported. We've looked at same entries in the ESRI forums and played with page size but no difference. When using a ExportToJPEG function the result is the same. If the map is exported to a PDF or Jpeg manually  the table displays correctly in the output file

We are using ArcGIS 10 (Info) with SP2   and tried both on Windows XP and Windows 7 machines.

Anyone with similar problems? many thanks

Rui
Tags (2)
0 Kudos
2 Replies
JeffBarrette
Esri Regular Contributor
Tables inserted into a layout can't be dymanically updated via arcpy.  There is a sample that simulates dynamic tables in a layout.  The table itself is a graphic and the values are text elements that get updated by reading the dataset.

Here is a link:
http://resources.arcgis.com/gallery/file/geoprocessing/details?entryID=8C8E6EB6-1422-2418-A0B8-6AA61...

Jeff
0 Kudos
RuiLopes
Emerging Contributor
Thanks for the tips and link Jeff.

The table in the layout doesn't need to be updated by arcpy, it just needs to be synchronised with the data source. ESRI UK gave us a work around that is basically to increase the size of the table object in the layout and shrink it back to the original size programmatically. This shows that the layout tables are actually dynamic, unlike in previous versions, but the dynamic bit doesn't work well!

Rui

Tables inserted into a layout can't be dymanically updated via arcpy.  There is a sample that simulates dynamic tables in a layout.  The table itself is a graphic and the values are text elements that get updated by reading the dataset.

Here is a link:
http://resources.arcgis.com/gallery/file/geoprocessing/details?entryID=8C8E6EB6-1422-2418-A0B8-6AA61...

Jeff
0 Kudos